@formatjs/intl-durationformat 0.9.0 → 0.9.2
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 +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/polyfill-force.js +9 -17
- package/polyfill.js +10 -18
- package/should-polyfill.js +1 -1
- package/src/abstract/DurationRecordSign.d.ts +1 -1
- package/src/abstract/DurationRecordSign.js +11 -11
- package/src/abstract/GetDurationUnitOptions.d.ts +2 -2
- package/src/abstract/GetDurationUnitOptions.js +34 -41
- package/src/abstract/IsValidDurationRecord.d.ts +1 -1
- package/src/abstract/IsValidDurationRecord.js +16 -16
- package/src/abstract/PartitionDurationFormatPattern.d.ts +2 -2
- package/src/abstract/PartitionDurationFormatPattern.js +127 -147
- package/src/abstract/ToDurationRecord.d.ts +1 -1
- package/src/abstract/ToDurationRecord.js +58 -66
- package/src/abstract/ToIntegerIfIntegral.js +4 -4
- package/src/constants.d.ts +60 -60
- package/src/constants.js +83 -82
- package/src/core.d.ts +15 -15
- package/src/core.js +298 -247
- package/src/get_internal_slots.d.ts +3 -1
- package/src/get_internal_slots.js +7 -7
- package/src/numbering-systems.generated.js +99 -1
- package/src/time-separators.generated.d.ts +2342 -2340
- package/src/time-separators.generated.js +809 -3905
- package/src/types.d.ts +91 -89
- package/src/types.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./src/core.js";
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./src/core.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-durationformat",
|
|
3
3
|
"description": "Intl.DurationFormat polyfill",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Long Ho <holevietlong@gmail.com>",
|
|
7
7
|
"type": "module",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.8.0",
|
|
17
|
-
"@formatjs/ecma402-abstract": "3.0.
|
|
18
|
-
"@formatjs/intl-localematcher": "0.7.
|
|
17
|
+
"@formatjs/ecma402-abstract": "3.0.8",
|
|
18
|
+
"@formatjs/intl-localematcher": "0.7.5"
|
|
19
19
|
},
|
|
20
20
|
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
21
21
|
"homepage": "https://github.com/formatjs/formatjs#readme",
|
package/polyfill-force.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { DurationFormat } from
|
|
2
|
-
if (typeof Intl ===
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
else if (typeof global !== 'undefined') {
|
|
10
|
-
// @ts-ignore we don't include @types/node so global isn't a thing
|
|
11
|
-
Object.defineProperty(global, 'Intl', {
|
|
12
|
-
value: {},
|
|
13
|
-
});
|
|
14
|
-
}
|
|
1
|
+
import { DurationFormat } from "./index.js";
|
|
2
|
+
if (typeof Intl === "undefined") {
|
|
3
|
+
if (typeof window !== "undefined") {
|
|
4
|
+
Object.defineProperty(window, "Intl", { value: {} });
|
|
5
|
+
} else if (typeof global !== "undefined") {
|
|
6
|
+
// @ts-ignore we don't include @types/node so global isn't a thing
|
|
7
|
+
Object.defineProperty(global, "Intl", { value: {} });
|
|
8
|
+
}
|
|
15
9
|
}
|
|
16
|
-
Object.defineProperty(Intl,
|
|
17
|
-
value: DurationFormat,
|
|
18
|
-
});
|
|
10
|
+
Object.defineProperty(Intl, "DurationFormat", { value: DurationFormat });
|
package/polyfill.js
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { DurationFormat } from
|
|
2
|
-
import { shouldPolyfill } from
|
|
3
|
-
if (typeof Intl ===
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
else if (typeof global !== 'undefined') {
|
|
11
|
-
// @ts-ignore we don't include @types/node so global isn't a thing
|
|
12
|
-
Object.defineProperty(global, 'Intl', {
|
|
13
|
-
value: {},
|
|
14
|
-
});
|
|
15
|
-
}
|
|
1
|
+
import { DurationFormat } from "./index.js";
|
|
2
|
+
import { shouldPolyfill } from "./should-polyfill.js";
|
|
3
|
+
if (typeof Intl === "undefined") {
|
|
4
|
+
if (typeof window !== "undefined") {
|
|
5
|
+
Object.defineProperty(window, "Intl", { value: {} });
|
|
6
|
+
} else if (typeof global !== "undefined") {
|
|
7
|
+
// @ts-ignore we don't include @types/node so global isn't a thing
|
|
8
|
+
Object.defineProperty(global, "Intl", { value: {} });
|
|
9
|
+
}
|
|
16
10
|
}
|
|
17
11
|
if (shouldPolyfill()) {
|
|
18
|
-
|
|
19
|
-
value: DurationFormat,
|
|
20
|
-
});
|
|
12
|
+
Object.defineProperty(Intl, "DurationFormat", { value: DurationFormat });
|
|
21
13
|
}
|
package/should-polyfill.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DurationRecord } from
|
|
1
|
+
import { type DurationRecord } from "../types.js";
|
|
2
2
|
export declare function DurationRecordSign(record: DurationRecord): -1 | 0 | 1;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TABLE_1 } from
|
|
1
|
+
import { TABLE_1 } from "../constants.js";
|
|
2
|
+
import "../types.js";
|
|
2
3
|
export function DurationRecordSign(record) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return 0;
|
|
4
|
+
for (const key of TABLE_1) {
|
|
5
|
+
if (record[key] < 0) {
|
|
6
|
+
return -1;
|
|
7
|
+
}
|
|
8
|
+
if (record[key] > 0) {
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function GetDurationUnitOptions<T extends object>(unit: keyof T, options: T, baseStyle: Exclude<T[keyof T], undefined>, stylesList: readonly T[keyof T][], digitalBase: Exclude<T[keyof T], undefined>, prevStyle: string): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
style: Exclude<T[keyof T], undefined>;
|
|
3
|
+
display: string | Exclude<T[keyof T], undefined>;
|
|
4
4
|
};
|
|
@@ -1,43 +1,36 @@
|
|
|
1
|
-
import { GetOption } from
|
|
1
|
+
import { GetOption } from "@formatjs/ecma402-abstract";
|
|
2
2
|
export function GetDurationUnitOptions(unit, options, baseStyle, stylesList, digitalBase, prevStyle) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
style: style,
|
|
41
|
-
display: display,
|
|
42
|
-
};
|
|
3
|
+
let style = GetOption(options, unit, "string", stylesList, undefined);
|
|
4
|
+
let displayDefault = "always";
|
|
5
|
+
if (style === undefined) {
|
|
6
|
+
if (baseStyle === "digital") {
|
|
7
|
+
if (unit !== "hours" && unit !== "minutes" && unit !== "seconds") {
|
|
8
|
+
displayDefault = "auto";
|
|
9
|
+
}
|
|
10
|
+
style = digitalBase;
|
|
11
|
+
} else {
|
|
12
|
+
displayDefault = "auto";
|
|
13
|
+
if (prevStyle === "numeric" || prevStyle === "2-digit") {
|
|
14
|
+
style = "numeric";
|
|
15
|
+
} else {
|
|
16
|
+
style = baseStyle;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
let displayField = `${unit}Display`;
|
|
21
|
+
let display = GetOption(options, displayField, "string", ["always", "auto"], displayDefault);
|
|
22
|
+
if (prevStyle === "numeric" || prevStyle === "2-digit") {
|
|
23
|
+
if (style !== "numeric" && style !== "2-digit") {
|
|
24
|
+
throw new RangeError("Can't mix numeric and non-numeric styles");
|
|
25
|
+
} else if (unit === "minutes" || unit === "seconds") {
|
|
26
|
+
style = "2-digit";
|
|
27
|
+
}
|
|
28
|
+
if (style === "numeric" && display === "always" && (unit === "milliseconds" || unit === "microseconds" || unit === "nanoseconds")) {
|
|
29
|
+
throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
style,
|
|
34
|
+
display
|
|
35
|
+
};
|
|
43
36
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DurationRecord } from
|
|
1
|
+
import { type DurationRecord } from "../types.js";
|
|
2
2
|
export declare function IsValidDurationRecord(record: DurationRecord): boolean;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { invariant } from
|
|
2
|
-
import { TABLE_1 } from
|
|
3
|
-
import
|
|
1
|
+
import { invariant } from "@formatjs/ecma402-abstract";
|
|
2
|
+
import { TABLE_1 } from "../constants.js";
|
|
3
|
+
import "../types.js";
|
|
4
|
+
import { DurationRecordSign } from "./DurationRecordSign.js";
|
|
4
5
|
export function IsValidDurationRecord(record) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return true;
|
|
6
|
+
const sign = DurationRecordSign(record);
|
|
7
|
+
for (const key of TABLE_1) {
|
|
8
|
+
const v = record[key];
|
|
9
|
+
invariant(isFinite(Number(v)), `${key} is not finite`);
|
|
10
|
+
if (v < 0 && sign > 0) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (v > 0 && sign < 0) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return true;
|
|
18
18
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DurationFormat } from
|
|
2
|
-
import { DurationFormatPart, DurationRecord } from
|
|
1
|
+
import { DurationFormat } from "../core.js";
|
|
2
|
+
import { type DurationFormatPart, type DurationRecord } from "../types.js";
|
|
3
3
|
export declare function PartitionDurationFormatPattern(df: DurationFormat, duration: DurationRecord): DurationFormatPart[];
|
|
@@ -1,149 +1,129 @@
|
|
|
1
|
-
import { createMemoizedListFormat, createMemoizedNumberFormat, invariant
|
|
2
|
-
import { TABLE_2 } from
|
|
3
|
-
import { DurationFormat } from
|
|
4
|
-
import { getInternalSlots } from
|
|
1
|
+
import { createMemoizedListFormat, createMemoizedNumberFormat, invariant } from "@formatjs/ecma402-abstract";
|
|
2
|
+
import { TABLE_2 } from "../constants.js";
|
|
3
|
+
import { DurationFormat } from "../core.js";
|
|
4
|
+
import { getInternalSlots } from "../get_internal_slots.js";
|
|
5
|
+
import "../types.js";
|
|
5
6
|
export function PartitionDurationFormatPattern(df, duration) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var flattened = [];
|
|
129
|
-
for (var _b = 0, formatted_1 = formatted; _b < formatted_1.length; _b++) {
|
|
130
|
-
var _c = formatted_1[_b], type = _c.type, value = _c.value;
|
|
131
|
-
if (type === 'element') {
|
|
132
|
-
invariant(resultIndex < resultLength, 'Index out of bounds');
|
|
133
|
-
var parts = result[resultIndex];
|
|
134
|
-
for (var _d = 0, parts_2 = parts; _d < parts_2.length; _d++) {
|
|
135
|
-
var part = parts_2[_d];
|
|
136
|
-
flattened.push(part);
|
|
137
|
-
}
|
|
138
|
-
resultIndex++;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
invariant(type === 'literal', 'Type must be literal');
|
|
142
|
-
flattened.push({
|
|
143
|
-
type: 'literal',
|
|
144
|
-
value: value,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return flattened;
|
|
7
|
+
const result = [];
|
|
8
|
+
let done = false;
|
|
9
|
+
let separated = false;
|
|
10
|
+
const internalSlots = getInternalSlots(df);
|
|
11
|
+
let dataLocale = internalSlots.dataLocale;
|
|
12
|
+
const dataLocaleData = DurationFormat.localeData[dataLocale];
|
|
13
|
+
if (!dataLocaleData) {
|
|
14
|
+
throw new TypeError("Invalid locale");
|
|
15
|
+
}
|
|
16
|
+
const numberingSystem = internalSlots.numberingSystem;
|
|
17
|
+
const separator = dataLocaleData.digitalFormat[numberingSystem];
|
|
18
|
+
for (let i = 0; i < TABLE_2.length && !done; i++) {
|
|
19
|
+
const row = TABLE_2[i];
|
|
20
|
+
let value = duration[row.valueField];
|
|
21
|
+
const style = internalSlots[row.styleSlot];
|
|
22
|
+
const display = internalSlots[row.displaySlot];
|
|
23
|
+
const { unit, numberFormatUnit } = row;
|
|
24
|
+
const nfOpts = Object.create(null);
|
|
25
|
+
if (unit === "seconds" || unit === "milliseconds" || unit === "microseconds") {
|
|
26
|
+
let nextStyle;
|
|
27
|
+
if (unit === "seconds") {
|
|
28
|
+
nextStyle = internalSlots.milliseconds;
|
|
29
|
+
} else if (unit === "milliseconds") {
|
|
30
|
+
nextStyle = internalSlots.microseconds;
|
|
31
|
+
} else {
|
|
32
|
+
nextStyle = internalSlots.nanoseconds;
|
|
33
|
+
}
|
|
34
|
+
if (nextStyle === "numeric") {
|
|
35
|
+
if (unit === "seconds") {
|
|
36
|
+
value += duration.milliseconds / 1e3 + duration.microseconds / 1e6 + duration.nanoseconds / 1e9;
|
|
37
|
+
} else if (unit === "milliseconds") {
|
|
38
|
+
value += duration.microseconds / 1e3 + duration.nanoseconds / 1e6;
|
|
39
|
+
} else {
|
|
40
|
+
value += duration.nanoseconds / 1e3;
|
|
41
|
+
}
|
|
42
|
+
if (internalSlots.fractionalDigits === undefined) {
|
|
43
|
+
nfOpts.maximumFractionDigits = 9;
|
|
44
|
+
nfOpts.minimumFractionDigits = 0;
|
|
45
|
+
} else {
|
|
46
|
+
nfOpts.maximumFractionDigits = internalSlots.fractionalDigits;
|
|
47
|
+
nfOpts.minimumFractionDigits = internalSlots.fractionalDigits;
|
|
48
|
+
}
|
|
49
|
+
nfOpts.roundingMode = "trunc";
|
|
50
|
+
done = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (value !== 0 || display !== "auto") {
|
|
54
|
+
nfOpts.numberingSystem = internalSlots.numberingSystem;
|
|
55
|
+
if (style === "2-digit") {
|
|
56
|
+
nfOpts.minimumIntegerDigits = 2;
|
|
57
|
+
}
|
|
58
|
+
if (style !== "2-digit" && style !== "numeric") {
|
|
59
|
+
nfOpts.style = "unit";
|
|
60
|
+
nfOpts.unit = numberFormatUnit;
|
|
61
|
+
nfOpts.unitDisplay = style;
|
|
62
|
+
}
|
|
63
|
+
const nf = createMemoizedNumberFormat(internalSlots.locale, nfOpts);
|
|
64
|
+
let list;
|
|
65
|
+
if (!separated) {
|
|
66
|
+
list = [];
|
|
67
|
+
} else {
|
|
68
|
+
list = result[result.length - 1];
|
|
69
|
+
list.push({
|
|
70
|
+
type: "literal",
|
|
71
|
+
value: separator
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
let parts = nf.formatToParts(value);
|
|
75
|
+
parts.forEach(({ type, value }) => {
|
|
76
|
+
list.push({
|
|
77
|
+
type,
|
|
78
|
+
value,
|
|
79
|
+
unit: numberFormatUnit
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
if (!separated) {
|
|
83
|
+
if (style === "2-digit" || style === "numeric") {
|
|
84
|
+
separated = true;
|
|
85
|
+
}
|
|
86
|
+
result.push(list);
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
separated = false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const lfOpts = Object.create(null);
|
|
93
|
+
lfOpts.type = "unit";
|
|
94
|
+
let listStyle = internalSlots.style;
|
|
95
|
+
if (listStyle === "digital") {
|
|
96
|
+
listStyle = "short";
|
|
97
|
+
}
|
|
98
|
+
lfOpts.style = listStyle;
|
|
99
|
+
const lf = createMemoizedListFormat(internalSlots.locale, lfOpts);
|
|
100
|
+
const strings = [];
|
|
101
|
+
for (const parts of result) {
|
|
102
|
+
let string = "";
|
|
103
|
+
for (const { value } of parts) {
|
|
104
|
+
string += value;
|
|
105
|
+
}
|
|
106
|
+
strings.push(string);
|
|
107
|
+
}
|
|
108
|
+
let formatted = lf.formatToParts(strings);
|
|
109
|
+
let resultIndex = 0;
|
|
110
|
+
let resultLength = result.length;
|
|
111
|
+
let flattened = [];
|
|
112
|
+
for (const { type, value } of formatted) {
|
|
113
|
+
if (type === "element") {
|
|
114
|
+
invariant(resultIndex < resultLength, "Index out of bounds");
|
|
115
|
+
let parts = result[resultIndex];
|
|
116
|
+
for (const part of parts) {
|
|
117
|
+
flattened.push(part);
|
|
118
|
+
}
|
|
119
|
+
resultIndex++;
|
|
120
|
+
} else {
|
|
121
|
+
invariant(type === "literal", "Type must be literal");
|
|
122
|
+
flattened.push({
|
|
123
|
+
type: "literal",
|
|
124
|
+
value
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return flattened;
|
|
149
129
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DurationInput, DurationRecord } from
|
|
1
|
+
import { type DurationInput, type DurationRecord } from "../types.js";
|
|
2
2
|
export declare function ToDurationRecord(input: DurationInput): DurationRecord;
|