registration
This commit is contained in:
19
frontend/style/node_modules/date-fns/set.d.ts
generated
vendored
19
frontend/style/node_modules/date-fns/set.d.ts
generated
vendored
@@ -1,4 +1,9 @@
|
||||
import type { DateValues } from "./types.js";
|
||||
import type { ContextOptions, DateArg, DateValues } from "./types.js";
|
||||
/**
|
||||
* The {@link set} function options.
|
||||
*/
|
||||
export interface SetOptions<DateType extends Date = Date>
|
||||
extends ContextOptions<DateType> {}
|
||||
/**
|
||||
* @name set
|
||||
* @category Common Helpers
|
||||
@@ -15,9 +20,11 @@ import type { DateValues } from "./types.js";
|
||||
* other `setX` functions that date-fns provides if you are concerned about the bundle size.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @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 date - The date to be changed
|
||||
* @param values - The date values to be set
|
||||
* @param options - The options
|
||||
*
|
||||
* @returns The new date with options set
|
||||
*
|
||||
@@ -31,7 +38,11 @@ import type { DateValues } from "./types.js";
|
||||
* const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })
|
||||
* //=> Mon Sep 01 2014 12:23:45
|
||||
*/
|
||||
export declare function set<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
export declare function set<
|
||||
DateType extends Date,
|
||||
ResultDate extends Date = DateType,
|
||||
>(
|
||||
date: DateArg<DateType>,
|
||||
values: DateValues,
|
||||
): DateType;
|
||||
options?: SetOptions<ResultDate>,
|
||||
): ResultDate;
|
||||
|
||||
Reference in New Issue
Block a user