massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / node_modules / typescript / lib / lib.es2018.intl.d.ts
index 071970181a632b5135ff75495a95caaecfdccb37..dc4fd229d7ee8450f83bd664550b788983bca45c 100644 (file)
@@ -25,13 +25,13 @@ declare namespace Intl {
     type PluralRuleType = "cardinal" | "ordinal";\r
 \r
     interface PluralRulesOptions {\r
-        localeMatcher?: "lookup" | "best fit";\r
-        type?: PluralRuleType;\r
-        minimumIntegerDigits?: number;\r
-        minimumFractionDigits?: number;\r
-        maximumFractionDigits?: number;\r
-        minimumSignificantDigits?: number;\r
-        maximumSignificantDigits?: number;\r
+        localeMatcher?: "lookup" | "best fit" | undefined;\r
+        type?: PluralRuleType | undefined;\r
+        minimumIntegerDigits?: number | undefined;\r
+        minimumFractionDigits?: number | undefined;\r
+        maximumFractionDigits?: number | undefined;\r
+        minimumSignificantDigits?: number | undefined;\r
+        maximumSignificantDigits?: number | undefined;\r
     }\r
 \r
     interface ResolvedPluralRulesOptions {\r
@@ -53,9 +53,21 @@ declare namespace Intl {
     const PluralRules: {\r
         new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;\r
         (locales?: string | string[], options?: PluralRulesOptions): PluralRules;\r
-        supportedLocalesOf(\r
-            locales: string | string[],\r
-            options?: PluralRulesOptions,\r
-        ): string[];\r
+\r
+        supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];\r
     };\r
+\r
+    // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:\r
+    type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";\r
+    type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";\r
+    type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;\r
+\r
+    interface NumberFormatPart {\r
+        type: NumberFormatPartTypes;\r
+        value: string;\r
+    }\r
+\r
+    interface NumberFormat {\r
+        formatToParts(number?: number | bigint): NumberFormatPart[];\r
+    }\r
 }\r