From 0a0ec119cf3e77644e195595aaf9900ee7df3af5 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 24 Aug 2024 09:50:00 -0400 Subject: [PATCH] fix!: remove deprecated `durationMs` prop - 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)}; }