diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2021-12-10 09:12:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-10 09:12:21 +1100 |
| commit | 345f0fbe5cdaa71af067c7072537f1823fe4ada5 (patch) | |
| tree | c37062607fe23ef9d1826c1d43a10a712b827f3c /cli/dts/lib.es2018.intl.d.ts | |
| parent | a3d024ac2ec8d73f7bf268823866d2342d1c1eb1 (diff) | |
feat(cli): update to TypeScript 4.5 (#12410)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/dts/lib.es2018.intl.d.ts')
| -rw-r--r-- | cli/dts/lib.es2018.intl.d.ts | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/cli/dts/lib.es2018.intl.d.ts b/cli/dts/lib.es2018.intl.d.ts index 0d7961101..97c0eedb0 100644 --- a/cli/dts/lib.es2018.intl.d.ts +++ b/cli/dts/lib.es2018.intl.d.ts @@ -25,13 +25,13 @@ declare namespace Intl { type PluralRuleType = "cardinal" | "ordinal"; interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit"; - type?: PluralRuleType; - minimumIntegerDigits?: number; - minimumFractionDigits?: number; - maximumFractionDigits?: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + localeMatcher?: "lookup" | "best fit" | undefined; + type?: PluralRuleType | undefined; + minimumIntegerDigits?: number | undefined; + minimumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; + maximumSignificantDigits?: number | undefined; } interface ResolvedPluralRulesOptions { @@ -53,9 +53,21 @@ declare namespace Intl { const PluralRules: { new (locales?: string | string[], options?: PluralRulesOptions): PluralRules; (locales?: string | string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf( - locales: string | string[], - options?: PluralRulesOptions, - ): string[]; + + supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[]; }; + + // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here: + type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name"; + type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown"; + type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType; + + interface NumberFormatPart { + type: NumberFormatPartTypes; + value: string; + } + + interface NumberFormat { + formatToParts(number?: number | bigint): NumberFormatPart[]; + } } |
