@formatjs/intl-durationformat 0.10.2 → 0.10.4
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 +78 -1
- package/index.js +2179 -1
- package/index.js.map +1 -0
- package/package.json +2 -3
- package/polyfill-force.d.ts +1 -1
- package/polyfill-force.js +2182 -7
- package/polyfill-force.js.map +1 -0
- package/polyfill.d.ts +1 -1
- package/polyfill.js +2187 -10
- 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/abstract/DurationRecordSign.d.ts +0 -2
- package/src/abstract/DurationRecordSign.js +0 -13
- package/src/abstract/GetDurationUnitOptions.d.ts +0 -4
- package/src/abstract/GetDurationUnitOptions.js +0 -36
- package/src/abstract/IsValidDurationRecord.d.ts +0 -2
- package/src/abstract/IsValidDurationRecord.js +0 -18
- package/src/abstract/PartitionDurationFormatPattern.d.ts +0 -3
- package/src/abstract/PartitionDurationFormatPattern.js +0 -129
- package/src/abstract/ToDurationRecord.d.ts +0 -2
- package/src/abstract/ToDurationRecord.js +0 -60
- package/src/abstract/ToIntegerIfIntegral.d.ts +0 -1
- package/src/abstract/ToIntegerIfIntegral.js +0 -6
- package/src/constants.d.ts +0 -63
- package/src/constants.js +0 -85
- package/src/core.d.ts +0 -18
- package/src/core.js +0 -308
- package/src/get_internal_slots.d.ts +0 -2
- package/src/get_internal_slots.js +0 -9
- package/src/numbering-systems.generated.d.ts +0 -1
- package/src/numbering-systems.generated.js +0 -99
- package/src/time-separators.generated.d.ts +0 -2342
- package/src/time-separators.generated.js +0 -812
- package/src/types.d.ts +0 -108
- package/src/types.js +0 -1
package/src/types.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
export type DurationFormatOptions = Partial<ResolvedDurationFormatOptions>;
|
|
2
|
-
export interface ResolvedDurationFormatOptions {
|
|
3
|
-
localeMatcher: "best fit" | "lookup";
|
|
4
|
-
style: "long" | "short" | "narrow" | "digital";
|
|
5
|
-
years: "long" | "short" | "narrow";
|
|
6
|
-
yearsDisplay: "always" | "auto";
|
|
7
|
-
months: "long" | "short" | "narrow";
|
|
8
|
-
monthsDisplay: "always" | "auto";
|
|
9
|
-
weeks: "long" | "short" | "narrow";
|
|
10
|
-
weeksDisplay: "always" | "auto";
|
|
11
|
-
days: "long" | "short" | "narrow";
|
|
12
|
-
daysDisplay: "always" | "auto";
|
|
13
|
-
hours: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
14
|
-
hoursDisplay: "always" | "auto";
|
|
15
|
-
minutes: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
16
|
-
minutesDisplay: "always" | "auto";
|
|
17
|
-
seconds: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
18
|
-
secondsDisplay: "always" | "auto";
|
|
19
|
-
milliseconds: "long" | "short" | "narrow" | "numeric";
|
|
20
|
-
millisecondsDisplay: "always" | "auto";
|
|
21
|
-
microseconds: "long" | "short" | "narrow" | "numeric";
|
|
22
|
-
microsecondsDisplay: "always" | "auto";
|
|
23
|
-
nanoseconds: "long" | "short" | "narrow" | "numeric";
|
|
24
|
-
nanosecondsDisplay: "always" | "auto";
|
|
25
|
-
fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
26
|
-
numberingSystem: string;
|
|
27
|
-
round: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface DurationFormatPart {
|
|
30
|
-
unit?: string;
|
|
31
|
-
type: unknown;
|
|
32
|
-
value: string;
|
|
33
|
-
}
|
|
34
|
-
export interface RawDurationLocaleData {
|
|
35
|
-
data: DurationFormatLocaleInternalData;
|
|
36
|
-
locale: string;
|
|
37
|
-
}
|
|
38
|
-
export interface DurationFormatLocaleInternalData {
|
|
39
|
-
nu: readonly string[];
|
|
40
|
-
digitalFormat: Record<string, string>;
|
|
41
|
-
}
|
|
42
|
-
export interface DurationFormat {
|
|
43
|
-
resolvedOptions(): ResolvedDurationFormatOptions;
|
|
44
|
-
formatToParts(duration: DurationInput): DurationFormatPart[];
|
|
45
|
-
format(duration: DurationInput): string;
|
|
46
|
-
}
|
|
47
|
-
export interface IntlDurationFormatInternal {
|
|
48
|
-
initializedDurationFormat: boolean;
|
|
49
|
-
fractionalDigits: number | undefined;
|
|
50
|
-
dataLocale: string;
|
|
51
|
-
locale: string;
|
|
52
|
-
numberingSystem: string;
|
|
53
|
-
style: DurationFormatOptions["style"];
|
|
54
|
-
years: "long" | "short" | "narrow";
|
|
55
|
-
yearsDisplay: "always" | "auto";
|
|
56
|
-
months: "long" | "short" | "narrow";
|
|
57
|
-
monthsDisplay: "always" | "auto";
|
|
58
|
-
weeks: "long" | "short" | "narrow";
|
|
59
|
-
weeksDisplay: "always" | "auto";
|
|
60
|
-
days: "long" | "short" | "narrow";
|
|
61
|
-
daysDisplay: "always" | "auto";
|
|
62
|
-
hours: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
63
|
-
hoursDisplay: "always" | "auto";
|
|
64
|
-
minutes: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
65
|
-
minutesDisplay: "always" | "auto";
|
|
66
|
-
seconds: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
67
|
-
secondsDisplay: "always" | "auto";
|
|
68
|
-
milliseconds: "long" | "short" | "narrow" | "numeric";
|
|
69
|
-
millisecondsDisplay: "always" | "auto";
|
|
70
|
-
microseconds: "long" | "short" | "narrow" | "numeric";
|
|
71
|
-
microsecondsDisplay: "always" | "auto";
|
|
72
|
-
nanoseconds: "long" | "short" | "narrow" | "numeric";
|
|
73
|
-
nanosecondsDisplay: "always" | "auto";
|
|
74
|
-
}
|
|
75
|
-
export interface DurationInput {
|
|
76
|
-
years?: number;
|
|
77
|
-
months?: number;
|
|
78
|
-
weeks?: number;
|
|
79
|
-
days?: number;
|
|
80
|
-
hours?: number;
|
|
81
|
-
minutes?: number;
|
|
82
|
-
seconds?: number;
|
|
83
|
-
milliseconds?: number;
|
|
84
|
-
microseconds?: number;
|
|
85
|
-
nanoseconds?: number;
|
|
86
|
-
}
|
|
87
|
-
export interface DurationRecord {
|
|
88
|
-
years: number;
|
|
89
|
-
months: number;
|
|
90
|
-
weeks: number;
|
|
91
|
-
days: number;
|
|
92
|
-
hours: number;
|
|
93
|
-
minutes: number;
|
|
94
|
-
seconds: number;
|
|
95
|
-
milliseconds: number;
|
|
96
|
-
microseconds: number;
|
|
97
|
-
nanoseconds: number;
|
|
98
|
-
}
|
|
99
|
-
export interface DurationFormatConstructor {
|
|
100
|
-
new (locales?: string | string[], options?: DurationFormatOptions): DurationFormat;
|
|
101
|
-
(locales?: string | string[], options?: DurationFormatOptions): DurationFormat;
|
|
102
|
-
supportedLocalesOf(locales: string | string[], options?: Pick<DurationFormatOptions, "localeMatcher">): string[];
|
|
103
|
-
getDefaultLocale(): string;
|
|
104
|
-
__defaultLocale: string;
|
|
105
|
-
localeData: Record<string, DurationFormatLocaleInternalData | undefined>;
|
|
106
|
-
availableLocales: Set<string>;
|
|
107
|
-
polyfilled: boolean;
|
|
108
|
-
}
|
package/src/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|