-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
18 lines (18 loc) · 1.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { type DurationUnit } from './units.js';
/**
* Converts a duration amount and duration unit into milliseconds.
* @param durationAmount - Duration amount.
* @param durationUnit - Duration unit.
* @returns Total number of milliseconds.
*/
export default function toMillis(durationAmount: number, durationUnit: DurationUnit | Uppercase<DurationUnit> | Capitalize<DurationUnit>): number;
/**
* Converts a duration amount and duration unit into seconds.
* @param durationAmount - Duration amount.
* @param durationUnit - Duration unit.
* @returns Total number of seconds.
*/
export declare function toSeconds(durationAmount: number, durationUnit: DurationUnit | Uppercase<DurationUnit> | Capitalize<DurationUnit>): number;
export { daysToMillis, daysToSeconds, hoursToMillis, hoursToSeconds, minutesToMillis, minutesToSeconds, millisToSeconds, secondsToMillis } from './calculations.js';
export { millisecondsInOneDay, millisecondsInOneHour, millisecondsInOneMinute, millisecondsInOneSecond, secondsInOneDay, secondsInOneHour, secondsInOneMinute } from './multipliers.js';
export { type DurationUnit, durationUnitsDays, durationUnitsHours, durationUnitsMilliseconds, durationUnitsMinutes, durationUnitsSeconds } from './units.js';