UNPKG

@samual/duration

Version:

Normalize and format durations of time.

20 lines (19 loc) 416 B
/** * Parent error of all errors intentionally thrown by `@samual/duration`. * * @example Basic Usage * ```ts * import { type Duration, normalizeDuration, formatDuration } from "@samual/duration" * * try { * // ... * } catch (error) { * if (error instanceof DurationError) * console.error("Caught", error) * else * throw error * } * ``` */ export declare class DurationError extends Error { }