|
1 | 1 | declare namespace Intl { |
2 | | - |
| 2 | + type DurationTimeFormatLocaleMatcher = "lookup" | "best fit"; |
3 | 3 | /** |
4 | 4 | * Value of the `unit` property in duration objects |
5 | 5 | * |
@@ -44,7 +44,7 @@ declare namespace Intl { |
44 | 44 |
|
45 | 45 |
|
46 | 46 |
|
47 | | - type DurationFormatOptions = "long"|"short"|"narrow"|"numeric"|"2-digit" |
| 47 | + type DurationFormatOption = "long"|"short"|"narrow"|"numeric"|"2-digit" |
48 | 48 |
|
49 | 49 |
|
50 | 50 | type DurationFormatDisplayOption = "always"|"auto"; |
@@ -84,28 +84,28 @@ declare namespace Intl { |
84 | 84 | } |
85 | 85 |
|
86 | 86 | interface DurationFormatOptions { |
87 | | - localeMatcher?: LocaleMatcher |
| 87 | + localeMatcher?: DurationTimeFormatLocaleMatcher |
88 | 88 | numberingSystem?: DateTimeFormatOptions["numberingSystem"] |
89 | 89 | style?: DurationFormatStyle |
90 | | - years?: Omit<DurationFormatOptions,"numeric"|"2-digit"> |
| 90 | + years?: Omit<DurationFormatOption,"numeric"|"2-digit"> |
91 | 91 | yearsDisplay?:DurationFormatDisplayOption |
92 | | - months?: Omit<DurationFormatOptions,"numeric"|"2-digit"> |
| 92 | + months?: Omit<DurationFormatOption,"numeric"|"2-digit"> |
93 | 93 | monthsDisplay?: DurationFormatDisplayOption |
94 | | - weeks?: Omit<DurationFormatOptions,"numeric"|"2-digit"> |
| 94 | + weeks?: Omit<DurationFormatOption,"numeric"|"2-digit"> |
95 | 95 | weeksDisplay?: DurationFormatDisplayOption |
96 | | - days?: Omit<DurationFormatOptions,"numeric"|"2-digit"> |
| 96 | + days?: Omit<DurationFormatOption,"numeric"|"2-digit"> |
97 | 97 | daysDisplay?: DurationFormatDisplayOption |
98 | | - hours?: DurationFormatOptions |
| 98 | + hours?: DurationFormatOption |
99 | 99 | hoursDisplay?: DurationFormatDisplayOption |
100 | | - minutes?: DurationFormatOptions |
| 100 | + minutes?: DurationFormatOption |
101 | 101 | minutesDisplay?: DurationFormatDisplayOption |
102 | | - seconds?: DurationFormatOptions |
| 102 | + seconds?: DurationFormatOption |
103 | 103 | secondsDisplay?: DurationFormatDisplayOption |
104 | | - milliseconds?: DurationFormatOptions |
| 104 | + milliseconds?: DurationFormatOption |
105 | 105 | millisecondsDisplay?: DurationFormatDisplayOption |
106 | | - microseconds?: DurationFormatOptions |
| 106 | + microseconds?: DurationFormatOption |
107 | 107 | microsecondsDisplay?: DurationFormatDisplayOption |
108 | | - nanosecond?: DurationFormatOptions |
| 108 | + nanosecond?: DurationFormatOption |
109 | 109 | nanosecondDisplay?: DurationFormatDisplayOption |
110 | 110 | fractionalDigits?: fractionalDigitsOption |
111 | 111 | } |
@@ -163,6 +163,6 @@ declare namespace Intl { |
163 | 163 | * |
164 | 164 | * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/supportedLocalesOf). |
165 | 165 | */ |
166 | | - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: LocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; |
| 166 | + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: DurationTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; |
167 | 167 | }; |
168 | 168 | } |
0 commit comments