registration
This commit is contained in:
18
frontend/style/node_modules/date-fns/startOfYear.d.ts
generated
vendored
18
frontend/style/node_modules/date-fns/startOfYear.d.ts
generated
vendored
@@ -1,3 +1,9 @@
|
||||
import type { ContextOptions, DateArg } from "./types.js";
|
||||
/**
|
||||
* The {@link startOfYear} function options.
|
||||
*/
|
||||
export interface StartOfYearOptions<DateType extends Date = Date>
|
||||
extends ContextOptions<DateType> {}
|
||||
/**
|
||||
* @name startOfYear
|
||||
* @category Year Helpers
|
||||
@@ -8,8 +14,10 @@
|
||||
* The result will be in the local timezone.
|
||||
*
|
||||
* @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 original date
|
||||
* @param options - The options
|
||||
*
|
||||
* @returns The start of a year
|
||||
*
|
||||
@@ -18,6 +26,10 @@
|
||||
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
||||
* //=> Wed Jan 01 2014 00:00:00
|
||||
*/
|
||||
export declare function startOfYear<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
): DateType;
|
||||
export declare function startOfYear<
|
||||
DateType extends Date,
|
||||
ResultDate extends Date = DateType,
|
||||
>(
|
||||
date: DateArg<DateType>,
|
||||
options?: StartOfYearOptions<ResultDate> | undefined,
|
||||
): ResultDate;
|
||||
|
||||
Reference in New Issue
Block a user