Skip to content

Commit 6ea4d9b

Browse files
fix: common type to localeMatcher
1 parent 248a8da commit 6ea4d9b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/es2020.intl.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ declare namespace Intl {
5656
*
5757
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
5858
*/
59-
type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit";
59+
type LocaleMatcher = "lookup" | "best fit";
6060

6161
/**
6262
* The format of output message.
@@ -87,7 +87,7 @@ declare namespace Intl {
8787
*/
8888
interface RelativeTimeFormatOptions {
8989
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
90-
localeMatcher?: RelativeTimeFormatLocaleMatcher;
90+
localeMatcher?: LocaleMatcher;
9191
/** The format of output message. */
9292
numeric?: RelativeTimeFormatNumeric;
9393
/** The length of the internationalized message. */
@@ -352,7 +352,7 @@ declare namespace Intl {
352352
| "standard";
353353

354354
interface DisplayNamesOptions {
355-
localeMatcher?: RelativeTimeFormatLocaleMatcher;
355+
localeMatcher?: LocaleMatcher;
356356
style?: RelativeTimeFormatStyle;
357357
type: DisplayNamesType;
358358
languageDisplay?: DisplayNamesLanguageDisplay;
@@ -426,7 +426,7 @@ declare namespace Intl {
426426
*
427427
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
428428
*/
429-
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[];
429+
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: LocaleMatcher; }): UnicodeBCP47LocaleIdentifier[];
430430
};
431431

432432
interface CollatorConstructor {
@@ -451,6 +451,6 @@ declare namespace Intl {
451451
new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
452452
(locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
453453

454-
supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
454+
supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: LocaleMatcher; }): string[];
455455
}
456456
}

0 commit comments

Comments
 (0)