registration
This commit is contained in:
19
frontend/style/node_modules/date-fns/parseJSON.d.ts
generated
vendored
19
frontend/style/node_modules/date-fns/parseJSON.d.ts
generated
vendored
@@ -1,9 +1,10 @@
|
||||
import type { ContextOptions } from "./types.js";
|
||||
/**
|
||||
* The {@link parseJSON} function options.
|
||||
*/
|
||||
export interface ParseJSONOptions<DateType extends Date = Date>
|
||||
extends ContextOptions<DateType> {}
|
||||
/**
|
||||
* @name parseJSON
|
||||
* @category Common Helpers
|
||||
* @summary Parse a JSON date string
|
||||
*
|
||||
* @description
|
||||
* Converts a complete ISO date string in UTC time, the typical format for transmitting
|
||||
* a date in JSON, to a JavaScript `Date` instance.
|
||||
*
|
||||
@@ -28,8 +29,14 @@
|
||||
*
|
||||
* Any other input type or invalid date strings will return an `Invalid Date`.
|
||||
*
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
* @param dateStr - A fully formed ISO8601 date string to convert
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The parsed date in the local time zone
|
||||
*/
|
||||
export declare function parseJSON(dateStr: string): Date;
|
||||
export declare function parseJSON<ResultDate extends Date = Date>(
|
||||
dateStr: string,
|
||||
options?: ParseJSONOptions<ResultDate> | undefined,
|
||||
): ResultDate;
|
||||
|
||||
Reference in New Issue
Block a user