Skip to content

Commit d9a4285

Browse files
author
Anton Gilgur
authored
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 <[email protected]>
1 parent e76346f commit d9a4285

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/duration.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { formatDuration } from '../../v2';
66
* Output a string duration from a number of seconds
77
*
88
* @param {number} props.durationS - The number of seconds.
9-
* @param {number} props.durationMs - The number of seconds. DEPRECATED: The "Ms" suffix is incorrect, use props.durationS instead.
109
*/
11-
export function Duration(props: {durationMs: number, durationS: number}) {
12-
return <span>{formatDuration(props.durationMs || props.durationS, 2)}</span>;
10+
export function Duration(props: {durationS: number}) {
11+
return <span>{formatDuration(props.durationS, 2)}</span>;
1312
}

0 commit comments

Comments
 (0)