@utilify/core
Version:
Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B
22 lines • 789 B
TypeScript
/**
* Parses a Date, string, or number into a valid Date object.
* @param {Date} date - The date to parse.
* @returns {Date} The parsed Date object.
* @throws {TypeError} If date is not valid.
*/
export default function parseDate(date: Date): Date;
/**
* Parses a string into a valid Date object.
* @param {string} date - The date string to parse.
* @returns {Date} The parsed Date object.
* @throws {TypeError} If date is not valid.
*/
export default function parseDate(date: string): Date;
/**
* Parses a number into a valid Date object.
* @param {number} date - The date number to parse.
* @returns {Date} The parsed Date object.
* @throws {TypeError} If date is not valid.
*/
export default function parseDate(date: number): Date;
//# sourceMappingURL=parseDate.d.ts.map