registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,4 +1,9 @@
import type { LocalizedOptions, WeekOptions } from "./types.js";
import type {
ContextOptions,
DateArg,
LocalizedOptions,
WeekOptions,
} from "./types.js";
/**
* The {@link formatRelative} function options.
*/
@@ -6,7 +11,8 @@ export interface FormatRelativeOptions
extends LocalizedOptions<
"options" | "localize" | "formatLong" | "formatRelative"
>,
WeekOptions {}
WeekOptions,
ContextOptions<Date> {}
/**
* @name formatRelative
* @category Common Helpers
@@ -24,8 +30,6 @@ export interface FormatRelativeOptions
* | Next 6 days | Sunday at 04:30 AM |
* | Other | 12/31/2017 |
*
* @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 date - The date to format
* @param baseDate - The date to compare with
* @param options - An object with options
@@ -43,8 +47,8 @@ export interface FormatRelativeOptions
* const result = formatRelative(subDays(new Date(), 6), new Date())
* //=> "last Thursday at 12:45 AM"
*/
export declare function formatRelative<DateType extends Date>(
date: DateType | number | string,
baseDate: DateType | number | string,
export declare function formatRelative(
date: DateArg<Date> & {},
baseDate: DateArg<Date> & {},
options?: FormatRelativeOptions,
): string;