Skip to content

Commit 93037b2

Browse files
fix: add type assertion for ms package compatibility
The ms package requires a StringValue type for string inputs. Added type assertion to satisfy TypeScript compiler requirements.
1 parent 1b1ebc4 commit 93037b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/timespan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function timespan(time: string | number, iat?: number): number {
55

66
if (typeof time === 'string') {
77
try {
8-
const milliseconds = ms(time);
8+
const milliseconds = ms(time as ms.StringValue);
99
if (!milliseconds || isNaN(milliseconds)) {
1010
return NaN;
1111
}

0 commit comments

Comments
 (0)