@formatjs/intl-getcanonicallocales 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +57 -5
- package/index.js +9328 -39
- package/index.js.map +1 -0
- package/package.json +1 -1
- package/polyfill-force.d.ts +1 -1
- package/polyfill-force.js +9353 -7
- package/polyfill-force.js.map +1 -0
- package/polyfill.d.ts +1 -1
- package/polyfill.iife.js +9365 -9479
- package/polyfill.js +9363 -15
- package/polyfill.js.map +1 -0
- package/should-polyfill.d.ts +5 -1
- package/should-polyfill.js +6 -1
- package/should-polyfill.js.map +1 -0
- package/src/aliases.generated.d.ts +0 -4
- package/src/aliases.generated.js +0 -1151
- package/src/canonicalizer.d.ts +0 -19
- package/src/canonicalizer.js +0 -210
- package/src/emitter.d.ts +0 -3
- package/src/emitter.js +0 -30
- package/src/likelySubtags.generated.d.ts +0 -1
- package/src/likelySubtags.generated.js +0 -7792
- package/src/parser.d.ts +0 -9
- package/src/parser.js +0 -235
- package/src/types.d.ts +0 -32
- package/src/types.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region packages/intl-getcanonicallocales/types.d.ts
|
|
2
|
+
interface UnicodeLocaleId {
|
|
3
|
+
lang: UnicodeLanguageId;
|
|
4
|
+
extensions: Array<UnicodeExtension | TransformedExtension | PuExtension | OtherExtension>;
|
|
5
|
+
}
|
|
6
|
+
interface UnicodeLanguageId {
|
|
7
|
+
lang: string;
|
|
8
|
+
script?: string;
|
|
9
|
+
region?: string;
|
|
10
|
+
variants: string[];
|
|
11
|
+
}
|
|
12
|
+
type KV = [string, string] | [string];
|
|
13
|
+
interface Extension {
|
|
14
|
+
type: string;
|
|
15
|
+
}
|
|
16
|
+
interface UnicodeExtension extends Extension {
|
|
17
|
+
type: "u";
|
|
18
|
+
keywords: KV[];
|
|
19
|
+
attributes: string[];
|
|
20
|
+
}
|
|
21
|
+
interface TransformedExtension extends Extension {
|
|
22
|
+
type: "t";
|
|
23
|
+
fields: KV[];
|
|
24
|
+
lang?: UnicodeLanguageId;
|
|
25
|
+
}
|
|
26
|
+
interface PuExtension extends Extension {
|
|
27
|
+
type: "x";
|
|
28
|
+
value: string;
|
|
29
|
+
}
|
|
30
|
+
interface OtherExtension extends Extension {
|
|
31
|
+
type: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "v" | "w" | "y" | "z";
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region packages/intl-getcanonicallocales/emitter.d.ts
|
|
36
|
+
declare function emitUnicodeLanguageId(lang?: UnicodeLanguageId): string;
|
|
37
|
+
declare function emitUnicodeLocaleId({
|
|
38
|
+
lang,
|
|
39
|
+
extensions
|
|
40
|
+
}: UnicodeLocaleId): string;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region packages/intl-getcanonicallocales/parser.d.ts
|
|
43
|
+
declare function isUnicodeLanguageSubtag(lang: string): boolean;
|
|
44
|
+
declare function isStructurallyValidLanguageTag(tag: string): boolean;
|
|
45
|
+
declare function isUnicodeRegionSubtag(region: string): boolean;
|
|
46
|
+
declare function isUnicodeScriptSubtag(script: string): boolean;
|
|
47
|
+
declare function parseUnicodeLanguageId(chunks: string[] | string): UnicodeLanguageId;
|
|
48
|
+
declare function parseUnicodeLocaleId(locale: string): UnicodeLocaleId;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region packages/intl-getcanonicallocales/likelySubtags.generated.d.ts
|
|
51
|
+
declare const likelySubtags: Record<string, string>;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region packages/intl-getcanonicallocales/index.d.ts
|
|
54
|
+
declare function getCanonicalLocales(locales?: string[] | string | Intl.Locale | Intl.Locale[] | ArrayLike<string | Intl.Locale>): string[];
|
|
55
|
+
//#endregion
|
|
56
|
+
export { Extension, KV, OtherExtension, PuExtension, TransformedExtension, UnicodeExtension, UnicodeLanguageId, UnicodeLocaleId, emitUnicodeLanguageId, emitUnicodeLocaleId, getCanonicalLocales, isStructurallyValidLanguageTag, isUnicodeLanguageSubtag, isUnicodeRegionSubtag, isUnicodeScriptSubtag, likelySubtags, parseUnicodeLanguageId, parseUnicodeLocaleId };
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|