@formatjs/intl-durationformat 0.10.3 → 0.10.5
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/index.d.ts
CHANGED
|
@@ -1 +1,78 @@
|
|
|
1
|
-
|
|
1
|
+
//#region packages/ecma402-abstract/types/duration.d.ts
|
|
2
|
+
interface DurationInput {
|
|
3
|
+
years?: number;
|
|
4
|
+
months?: number;
|
|
5
|
+
weeks?: number;
|
|
6
|
+
days?: number;
|
|
7
|
+
hours?: number;
|
|
8
|
+
minutes?: number;
|
|
9
|
+
seconds?: number;
|
|
10
|
+
milliseconds?: number;
|
|
11
|
+
microseconds?: number;
|
|
12
|
+
nanoseconds?: number;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region packages/intl-durationformat/types.d.ts
|
|
16
|
+
type DurationFormatOptions = Partial<ResolvedDurationFormatOptions>;
|
|
17
|
+
interface ResolvedDurationFormatOptions {
|
|
18
|
+
localeMatcher: "best fit" | "lookup";
|
|
19
|
+
style: "long" | "short" | "narrow" | "digital";
|
|
20
|
+
years: "long" | "short" | "narrow";
|
|
21
|
+
yearsDisplay: "always" | "auto";
|
|
22
|
+
months: "long" | "short" | "narrow";
|
|
23
|
+
monthsDisplay: "always" | "auto";
|
|
24
|
+
weeks: "long" | "short" | "narrow";
|
|
25
|
+
weeksDisplay: "always" | "auto";
|
|
26
|
+
days: "long" | "short" | "narrow";
|
|
27
|
+
daysDisplay: "always" | "auto";
|
|
28
|
+
hours: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
29
|
+
hoursDisplay: "always" | "auto";
|
|
30
|
+
minutes: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
31
|
+
minutesDisplay: "always" | "auto";
|
|
32
|
+
seconds: "long" | "short" | "narrow" | "numeric" | "2-digit";
|
|
33
|
+
secondsDisplay: "always" | "auto";
|
|
34
|
+
milliseconds: "long" | "short" | "narrow" | "numeric";
|
|
35
|
+
millisecondsDisplay: "always" | "auto";
|
|
36
|
+
microseconds: "long" | "short" | "narrow" | "numeric";
|
|
37
|
+
microsecondsDisplay: "always" | "auto";
|
|
38
|
+
nanoseconds: "long" | "short" | "narrow" | "numeric";
|
|
39
|
+
nanosecondsDisplay: "always" | "auto";
|
|
40
|
+
fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
41
|
+
numberingSystem: string;
|
|
42
|
+
round: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface DurationFormatPart {
|
|
45
|
+
unit?: string;
|
|
46
|
+
type: unknown;
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
interface DurationFormatLocaleInternalData {
|
|
50
|
+
nu: readonly string[];
|
|
51
|
+
digitalFormat: Record<string, string>;
|
|
52
|
+
}
|
|
53
|
+
interface DurationFormat$1 {
|
|
54
|
+
resolvedOptions(): ResolvedDurationFormatOptions;
|
|
55
|
+
formatToParts(duration: DurationInput): DurationFormatPart[];
|
|
56
|
+
format(duration: DurationInput): string;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region packages/intl-durationformat/core.d.ts
|
|
60
|
+
/**
|
|
61
|
+
* DurationFormat provides locale-sensitive duration formatting
|
|
62
|
+
* Implements the Intl.DurationFormat API from the TC39 proposal
|
|
63
|
+
*/
|
|
64
|
+
declare class DurationFormat implements DurationFormat$1 {
|
|
65
|
+
constructor(locales?: string | string[], options?: DurationFormatOptions);
|
|
66
|
+
resolvedOptions(): ResolvedDurationFormatOptions;
|
|
67
|
+
formatToParts(duration: DurationInput): DurationFormatPart[];
|
|
68
|
+
format(duration: DurationInput): string;
|
|
69
|
+
static supportedLocalesOf(locales: string | string[], options?: Pick<DurationFormatOptions, "localeMatcher">): string[];
|
|
70
|
+
static __defaultLocale: string;
|
|
71
|
+
static availableLocales: Set<string>;
|
|
72
|
+
static localeData: Record<string, DurationFormatLocaleInternalData | undefined>;
|
|
73
|
+
static getDefaultLocale: () => string;
|
|
74
|
+
static polyfilled: boolean;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { DurationFormat };
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|