/** * Parses a human-readable duration string into milliseconds. * Supports various units: ms, s, m, h, d, w. * * @param input - The duration string to parse (e.g., "5s", "10 min", "2h 30m"). * @returns The duration in milliseconds. * * @throws {Error} If input is empty. * @throws {Error} If input format is invalid. * @throws {Error} If the numeric value is negative or NaN. * @throws {Error} If the unit is not recognized. * * @example * // Basic usage * parseDuration("5s"); // Returns 5000 * * @example * // Minutes * parseDuration("10m"); // Returns 600000 * * @example * // Hours * parseDuration("2h"); // Returns 7200000 * * @example * // Combined units * parseDuration("1h 30m 15s"); // Returns 5415000 * * @example * // With spaces * parseDuration("5 seconds"); // Returns 5000 * * @note Supports abbreviated units (ms, s, m, h, d, w) and full names (milliseconds, seconds, minutes, hours, days, weeks). * Units are case-insensitive. Multiple units can be combined with spaces. * * @complexity Time: O(n), Space: O(1) - Where n is the length of input string */ export declare function parseDuration(input: string): number; //# sourceMappingURL=parseDuration.d.ts.map