/** * Supported time units for time string formatting. * * @public */ export type TimeUnit = "ms" | "s" | "m" | "h" | "d"; /** * A valid time string in the format: number followed by time unit. * Examples: "10m", "1h", "7d", "30s", "500ms" * * @public */ export type ValidTimeString = `${number}${TimeUnit}`; /** * Generates an expired date based on the given time string. * Calculates a future date by adding the specified time duration to the current time. * * @param timeString - A string in the format `${number}${TimeUnit}` (e.g., "10m", "7d", "60s", "1000ms") * @returns A Date object representing the expiration time * @throws {Error} If the time string format is invalid or uses unsupported time units * * @example * ```typescript * // Get a date 10 minutes from now * const expiry = generateExpiredDate("10m"); * * // Get a date 7 days from now * const weekFromNow = generateExpiredDate("7d"); * * // Get a date 30 seconds from now * const soon = generateExpiredDate("30s"); * ``` * * @public */ export declare function generateExpiredDate(timeString: ValidTimeString): Date; //# sourceMappingURL=generate-expired-date.d.ts.map