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,10 +1,16 @@
import type { LocalizedOptions, RoundingOptions } from "./types.js";
import type {
ContextOptions,
DateArg,
LocalizedOptions,
RoundingOptions,
} from "./types.js";
/**
* The {@link formatDistanceStrict} function options.
*/
export interface FormatDistanceStrictOptions
extends LocalizedOptions<"formatDistance">,
RoundingOptions {
RoundingOptions,
ContextOptions<Date> {
/** Add "X ago"/"in X" in the locale language */
addSuffix?: boolean;
/** If specified, will force the unit */
@@ -39,10 +45,8 @@ export type FormatDistanceStrictUnit =
* | 1 ... 11 months | [1..11] months |
* | 1 ... N years | [1..N] years |
*
* @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
* @param baseDate - The date to compare with
* @param laterDate - The date
* @param earlierDate - The date to compare with
* @param options - An object with options
*
* @returns The distance in words
@@ -99,8 +103,8 @@ export type FormatDistanceStrictUnit =
* })
* //=> '1 jaro'
*/
export declare function formatDistanceStrict<DateType extends Date>(
date: DateType | number | string,
baseDate: DateType | number | string,
export declare function formatDistanceStrict(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: FormatDistanceStrictOptions,
): string;