registration
This commit is contained in:
36
frontend/style/node_modules/date-fns/eachWeekOfInterval.d.ts
generated
vendored
36
frontend/style/node_modules/date-fns/eachWeekOfInterval.d.ts
generated
vendored
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
ContextOptions,
|
||||
Interval,
|
||||
LocalizedOptions,
|
||||
StepOptions,
|
||||
@@ -7,10 +8,28 @@ import type {
|
||||
/**
|
||||
* The {@link eachWeekOfInterval} function options.
|
||||
*/
|
||||
export interface EachWeekOfIntervalOptions
|
||||
export interface EachWeekOfIntervalOptions<DateType extends Date = Date>
|
||||
extends StepOptions,
|
||||
WeekOptions,
|
||||
LocalizedOptions<"options"> {}
|
||||
LocalizedOptions<"options">,
|
||||
ContextOptions<DateType> {}
|
||||
/**
|
||||
* The {@link eachWeekOfInterval} function result type. It resolves the proper data type.
|
||||
* It uses the first argument date object type, starting from the interval start date,
|
||||
* then the end interval date. If a context function is passed, it uses the context function return type.
|
||||
*/
|
||||
export type EachWeekOfIntervalResult<
|
||||
IntervalType extends Interval,
|
||||
Options extends EachWeekOfIntervalOptions | undefined,
|
||||
> = Array<
|
||||
Options extends EachWeekOfIntervalOptions<infer DateType>
|
||||
? DateType
|
||||
: IntervalType["start"] extends Date
|
||||
? IntervalType["start"]
|
||||
: IntervalType["end"] extends Date
|
||||
? IntervalType["end"]
|
||||
: Date
|
||||
>;
|
||||
/**
|
||||
* @name eachWeekOfInterval
|
||||
* @category Interval Helpers
|
||||
@@ -19,8 +38,6 @@ export interface EachWeekOfIntervalOptions
|
||||
* @description
|
||||
* Return the array of weeks within the specified time interval.
|
||||
*
|
||||
* @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).
|
||||
*
|
||||
* @param interval - The interval.
|
||||
* @param options - An object with options.
|
||||
*
|
||||
@@ -43,7 +60,10 @@ export interface EachWeekOfIntervalOptions
|
||||
* // Sun Nov 23 2014 00:00:00
|
||||
* // ]
|
||||
*/
|
||||
export declare function eachWeekOfInterval<DateType extends Date>(
|
||||
interval: Interval<DateType>,
|
||||
options?: EachWeekOfIntervalOptions,
|
||||
): DateType[];
|
||||
export declare function eachWeekOfInterval<
|
||||
IntervalType extends Interval,
|
||||
Options extends EachWeekOfIntervalOptions | undefined = undefined,
|
||||
>(
|
||||
interval: IntervalType,
|
||||
options?: Options,
|
||||
): EachWeekOfIntervalResult<IntervalType, Options>;
|
||||
|
||||
Reference in New Issue
Block a user