API reference › @evolu/common › Time › Duration
type Duration = DurationLiteral | Millis;
Defined in: packages/common/src/Time.ts:400
Convenience input accepting a human-readable DurationLiteral or
validated milliseconds as Millis. APIs normalize it to Millis.
Example
import { assertType, Millis, spaced } from "@evolu/common";
const readableSchedule = spaced("1s");
const validatedSchedule = spaced(Millis.orThrow(1000));
assertType<typeof validatedSchedule, typeof readableSchedule>();