Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion polyfill/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,36 @@ export namespace Temporal {
nanoseconds?: number;
};

/**
* Options for Intl.DurationFormat
*/
export type DurationFormatOptions = {
localeMatcher?: 'lookup' | 'best fit' | undefined;
numberingSystem?: string | undefined;
style?: 'long' | 'short' | 'narrow' | 'digital' | undefined;
years?: 'long' | 'short' | 'narrow' | undefined;
yearsDisplay?: 'always' | 'auto' | undefined;
months?: 'long' | 'short' | 'narrow' | undefined;
monthsDisplay?: 'always' | 'auto' | undefined;
weeks?: 'long' | 'short' | 'narrow' | undefined;
weeksDisplay?: 'always' | 'auto' | undefined;
days?: 'long' | 'short' | 'narrow' | undefined;
daysDisplay?: 'always' | 'auto' | undefined;
hours?: 'long' | 'short' | 'narrow' | 'numeric' | '2-digit' | undefined;
hoursDisplay?: 'always' | 'auto' | undefined;
minutes?: 'long' | 'short' | 'narrow' | 'numeric' | '2-digit' | undefined;
minutesDisplay?: 'always' | 'auto' | undefined;
seconds?: 'long' | 'short' | 'narrow' | 'numeric' | '2-digit' | undefined;
secondsDisplay?: 'always' | 'auto' | undefined;
milliseconds?: 'long' | 'short' | 'narrow' | 'numeric' | undefined;
millisecondsDisplay?: 'always' | 'auto' | undefined;
microseconds?: 'long' | 'short' | 'narrow' | 'numeric' | undefined;
microsecondsDisplay?: 'always' | 'auto' | undefined;
nanoseconds?: 'long' | 'short' | 'narrow' | 'numeric' | undefined;
nanosecondsDisplay?: 'always' | 'auto' | undefined;
fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
};

/**
*
* A `Temporal.Duration` represents an immutable duration of time which can be
Expand Down Expand Up @@ -552,7 +582,7 @@ export namespace Temporal {
subtract(other: Temporal.Duration | DurationLike | string): Temporal.Duration;
round(roundTo: DurationRoundTo): Temporal.Duration;
total(totalOf: DurationTotalOf): number;
toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: globalThis.Intl.DateTimeFormatOptions): string;
toLocaleString(locales?: globalThis.Intl.LocalesArgument, options?: DurationFormatOptions): string;
toJSON(): string;
toString(options?: ToStringPrecisionOptions): string;
valueOf(): never;
Expand Down