From d9a4285dc254bc473b9f26f5d72655296233f003 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:37:52 -0400 Subject: [PATCH] fix!: remove deprecated `durationMs` prop (#577) - I previously left in `durationMs` for backward-compatibility so that you could use either, but I forgot to mark the types as optional, so both ended up being required by the typings - instead of making them both confusingly optional (no way of doing "one of"), just remove the deprecated `durationMs` in another breaking change Signed-off-by: Anton Gilgur --- src/components/duration.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/duration.tsx b/src/components/duration.tsx index d20237e4..f5b6fbc2 100644 --- a/src/components/duration.tsx +++ b/src/components/duration.tsx @@ -6,8 +6,7 @@ import { formatDuration } from '../../v2'; * Output a string duration from a number of seconds * * @param {number} props.durationS - The number of seconds. - * @param {number} props.durationMs - The number of seconds. DEPRECATED: The "Ms" suffix is incorrect, use props.durationS instead. */ -export function Duration(props: {durationMs: number, durationS: number}) { - return {formatDuration(props.durationMs || props.durationS, 2)}; +export function Duration(props: {durationS: number}) { + return {formatDuration(props.durationS, 2)}; }