@formatjs/intl-locale 5.3.1 → 5.3.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 CHANGED
@@ -1,105 +1,108 @@
1
- export interface IntlLocaleOptions {
2
- language?: string;
3
- script?: string;
4
- region?: string;
5
- calendar?: string;
6
- collation?: string;
7
- hourCycle?: "h11" | "h12" | "h23" | "h24";
8
- caseFirst?: "upper" | "lower" | "false";
9
- numberingSystem?: string;
10
- numeric?: boolean;
11
- firstDayOfWeek?: string;
1
+ //#region packages/intl-locale/index.d.ts
2
+ interface IntlLocaleOptions {
3
+ language?: string;
4
+ script?: string;
5
+ region?: string;
6
+ calendar?: string;
7
+ collation?: string;
8
+ hourCycle?: "h11" | "h12" | "h23" | "h24";
9
+ caseFirst?: "upper" | "lower" | "false";
10
+ numberingSystem?: string;
11
+ numeric?: boolean;
12
+ firstDayOfWeek?: string;
12
13
  }
13
- export interface IntlLocaleInternal extends IntlLocaleOptions {
14
- locale: string;
15
- initializedLocale: boolean;
14
+ interface IntlLocaleInternal extends IntlLocaleOptions {
15
+ locale: string;
16
+ initializedLocale: boolean;
16
17
  }
17
- export declare class Locale {
18
- constructor(tag: string | Locale, opts?: IntlLocaleOptions);
19
- /**
20
- * https://www.unicode.org/reports/tr35/#Likely_Subtags
21
- */
22
- maximize(): Locale;
23
- /**
24
- * https://www.unicode.org/reports/tr35/#Likely_Subtags
25
- */
26
- minimize(): Locale;
27
- toString(): string;
28
- get baseName(): string;
29
- get calendar(): string | undefined;
30
- get collation(): string | undefined;
31
- get caseFirst(): "upper" | "lower" | "false" | undefined;
32
- get numeric(): boolean | undefined;
33
- get numberingSystem(): string | undefined;
34
- /**
35
- * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.language
36
- */
37
- get language(): string;
38
- /**
39
- * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.script
40
- */
41
- get script(): string | undefined;
42
- /**
43
- * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.region
44
- */
45
- get region(): string | undefined;
46
- /**
47
- * Returns the variant subtags of the locale, or undefined if none exist.
48
- * Multiple variants are joined with hyphens in alphabetical order.
49
- *
50
- * Added in ECMA-402 via PR #960 to align with other subtag accessors.
51
- * @see https://tc39.es/ecma402/#sec-Intl.Locale.prototype.variants
52
- * @see https://github.com/tc39/ecma402/pull/960
53
- * @see https://github.com/tc39/ecma402/issues/900
54
- */
55
- get variants(): string | undefined;
56
- get firstDayOfWeek(): string | undefined;
57
- get hourCycle(): "h11" | "h12" | "h23" | "h24" | undefined;
58
- /**
59
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars
60
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars
61
- */
62
- getCalendars(): string[];
63
- /**
64
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations
65
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations
66
- */
67
- getCollations(): string[];
68
- /**
69
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles
70
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles
71
- */
72
- getHourCycles(): string[];
73
- /**
74
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems
75
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems
76
- */
77
- getNumberingSystems(): string[];
78
- /**
79
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones
80
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones
81
- */
82
- getTimeZones(): string[] | undefined;
83
- /**
84
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
85
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo
86
- */
87
- getTextInfo(): {
88
- direction: string;
89
- };
90
- /**
91
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo
92
- * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo
93
- */
94
- getWeekInfo(): {
95
- firstDay: string;
96
- weekend: {
97
- start: string;
98
- end: string;
99
- };
100
- minimalDays: number;
101
- };
102
- static relevantExtensionKeys: readonly ["ca", "co", "hc", "kf", "kn", "nu", "fw"];
103
- static readonly polyfilled = true;
18
+ declare class Locale {
19
+ constructor(tag: string | Locale, opts?: IntlLocaleOptions);
20
+ /**
21
+ * https://www.unicode.org/reports/tr35/#Likely_Subtags
22
+ */
23
+ maximize(): Locale;
24
+ /**
25
+ * https://www.unicode.org/reports/tr35/#Likely_Subtags
26
+ */
27
+ minimize(): Locale;
28
+ toString(): string;
29
+ get baseName(): string;
30
+ get calendar(): string | undefined;
31
+ get collation(): string | undefined;
32
+ get caseFirst(): "upper" | "lower" | "false" | undefined;
33
+ get numeric(): boolean | undefined;
34
+ get numberingSystem(): string | undefined;
35
+ /**
36
+ * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.language
37
+ */
38
+ get language(): string;
39
+ /**
40
+ * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.script
41
+ */
42
+ get script(): string | undefined;
43
+ /**
44
+ * https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.region
45
+ */
46
+ get region(): string | undefined;
47
+ /**
48
+ * Returns the variant subtags of the locale, or undefined if none exist.
49
+ * Multiple variants are joined with hyphens in alphabetical order.
50
+ *
51
+ * Added in ECMA-402 via PR #960 to align with other subtag accessors.
52
+ * @see https://tc39.es/ecma402/#sec-Intl.Locale.prototype.variants
53
+ * @see https://github.com/tc39/ecma402/pull/960
54
+ * @see https://github.com/tc39/ecma402/issues/900
55
+ */
56
+ get variants(): string | undefined;
57
+ get firstDayOfWeek(): string | undefined;
58
+ get hourCycle(): "h11" | "h12" | "h23" | "h24" | undefined;
59
+ /**
60
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars
61
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars
62
+ */
63
+ getCalendars(): string[];
64
+ /**
65
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations
66
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations
67
+ */
68
+ getCollations(): string[];
69
+ /**
70
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles
71
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles
72
+ */
73
+ getHourCycles(): string[];
74
+ /**
75
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems
76
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems
77
+ */
78
+ getNumberingSystems(): string[];
79
+ /**
80
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones
81
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones
82
+ */
83
+ getTimeZones(): string[] | undefined;
84
+ /**
85
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
86
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo
87
+ */
88
+ getTextInfo(): {
89
+ direction: string;
90
+ };
91
+ /**
92
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo
93
+ * https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo
94
+ */
95
+ getWeekInfo(): {
96
+ firstDay: string;
97
+ weekend: {
98
+ start: string;
99
+ end: string;
100
+ };
101
+ minimalDays: number;
102
+ };
103
+ static relevantExtensionKeys: readonly ["ca", "co", "hc", "kf", "kn", "nu", "fw"];
104
+ static readonly polyfilled = true;
104
105
  }
105
- export default Locale;
106
+ //#endregion
107
+ export { IntlLocaleInternal, IntlLocaleOptions, Locale, Locale as default };
108
+ //# sourceMappingURL=index.d.ts.map