strict-ts-lib-v5.8 0.6.0 → 0.6.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/CHANGELOG.md +12 -0
- package/libs/es2015/core/index.d.ts +2 -2
- package/libs/es2018/intl/index.d.ts +21 -12
- package/libs/es2020/bigint/index.d.ts +29 -8
- package/libs/es5/index.d.ts +32 -19
- package/libs-branded/es2015/core/index.d.ts +2 -2
- package/libs-branded/es2018/intl/index.d.ts +21 -12
- package/libs-branded/es2020/bigint/index.d.ts +29 -8
- package/libs-branded/es5/index.d.ts +32 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# strict-ts-lib-v5.8
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 68452d4: Allow `0` as `toExponential`'s `fractionDigits`: the parameter type becomes `UintRangeInclusive<0, 100>`. ECMA-262 accepts 0–100 — `(1).toExponential(0)` is legal and returns `'1e+0'` — so the previous lower bound of 1 rejected a valid call.
|
|
8
|
+
|
|
9
|
+
## 0.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c5853e4: Spell numeric argument ranges with `UintRangeInclusive` instead of `UintRange`: `toFixed(fractionDigits?: UintRangeInclusive<0, 100>)` now names its bounds the way the docs do ("0 – 100, inclusive") rather than with an exclusive upper bound (`UintRange<0, 101>`). Applied to every converted range — `toString` radix, `toPrecision`, JSON `space`, `BigInt.asIntN/asUintN` bits, and the `Intl` digit options. The expanded literal-union types are unchanged; this is purely a notation change in the emitted declarations.
|
|
14
|
+
|
|
3
15
|
## 0.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -102,7 +102,7 @@ interface Math {
|
|
|
102
102
|
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
|
103
103
|
* @param x A numeric expression.
|
|
104
104
|
*/
|
|
105
|
-
clz32(x: number): import('ts-type-forge').
|
|
105
|
+
clz32(x: number): import('ts-type-forge').UintRangeInclusive<0, 32>;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Returns the result of 32-bit multiplication of two numbers.
|
|
@@ -275,7 +275,7 @@ interface NumberConstructor {
|
|
|
275
275
|
*/
|
|
276
276
|
parseInt(
|
|
277
277
|
string: string,
|
|
278
|
-
radix?: import('ts-type-forge').
|
|
278
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
279
279
|
): number;
|
|
280
280
|
}
|
|
281
281
|
|
|
@@ -9,19 +9,19 @@ declare namespace Intl {
|
|
|
9
9
|
readonly localeMatcher?: 'lookup' | 'best fit' | undefined;
|
|
10
10
|
readonly type?: PluralRuleType | undefined;
|
|
11
11
|
readonly minimumIntegerDigits?:
|
|
12
|
-
| import('ts-type-forge').
|
|
12
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
13
13
|
| undefined;
|
|
14
14
|
readonly minimumFractionDigits?:
|
|
15
|
-
| import('ts-type-forge').
|
|
15
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
16
16
|
| undefined;
|
|
17
17
|
readonly maximumFractionDigits?:
|
|
18
|
-
| import('ts-type-forge').
|
|
18
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
19
19
|
| undefined;
|
|
20
20
|
readonly minimumSignificantDigits?:
|
|
21
|
-
| import('ts-type-forge').
|
|
21
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
22
22
|
| undefined;
|
|
23
23
|
readonly maximumSignificantDigits?:
|
|
24
|
-
| import('ts-type-forge').
|
|
24
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
25
25
|
| undefined;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,16 +29,25 @@ declare namespace Intl {
|
|
|
29
29
|
readonly locale: string;
|
|
30
30
|
readonly pluralCategories: readonly LDMLPluralRule[];
|
|
31
31
|
readonly type: PluralRuleType;
|
|
32
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
33
|
-
readonly minimumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
34
|
-
readonly maximumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
35
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
32
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
36
33
|
1,
|
|
37
|
-
|
|
34
|
+
21
|
|
38
35
|
>;
|
|
39
|
-
readonly
|
|
36
|
+
readonly minimumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
37
|
+
0,
|
|
38
|
+
20
|
|
39
|
+
>;
|
|
40
|
+
readonly maximumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
41
|
+
0,
|
|
42
|
+
20
|
|
43
|
+
>;
|
|
44
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
45
|
+
1,
|
|
46
|
+
21
|
|
47
|
+
>;
|
|
48
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
40
49
|
1,
|
|
41
|
-
|
|
50
|
+
21
|
|
42
51
|
>;
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -47,27 +47,42 @@ interface BigIntToLocaleStringOptions {
|
|
|
47
47
|
/**
|
|
48
48
|
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
|
|
49
49
|
*/
|
|
50
|
-
readonly minimumIntegerDigits?: import('ts-type-forge').
|
|
50
|
+
readonly minimumIntegerDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
51
|
+
1,
|
|
52
|
+
21
|
|
53
|
+
>;
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
56
|
* The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information).
|
|
54
57
|
*/
|
|
55
|
-
readonly minimumFractionDigits?: import('ts-type-forge').
|
|
58
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
59
|
+
0,
|
|
60
|
+
20
|
|
61
|
+
>;
|
|
56
62
|
|
|
57
63
|
/**
|
|
58
64
|
* The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0.
|
|
59
65
|
*/
|
|
60
|
-
readonly maximumFractionDigits?: import('ts-type-forge').
|
|
66
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
67
|
+
0,
|
|
68
|
+
20
|
|
69
|
+
>;
|
|
61
70
|
|
|
62
71
|
/**
|
|
63
72
|
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
|
|
64
73
|
*/
|
|
65
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').
|
|
74
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
75
|
+
1,
|
|
76
|
+
21
|
|
77
|
+
>;
|
|
66
78
|
|
|
67
79
|
/**
|
|
68
80
|
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
|
|
69
81
|
*/
|
|
70
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
82
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
83
|
+
1,
|
|
84
|
+
21
|
|
85
|
+
>;
|
|
71
86
|
|
|
72
87
|
/**
|
|
73
88
|
* The formatting that should be displayed for the number, the defaults is "standard"
|
|
@@ -93,7 +108,7 @@ interface BigInt {
|
|
|
93
108
|
* Returns a string representation of an object.
|
|
94
109
|
* @param radix Specifies a radix for converting numeric values to strings.
|
|
95
110
|
*/
|
|
96
|
-
toString(radix?: import('ts-type-forge').
|
|
111
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
97
112
|
|
|
98
113
|
/** Returns a string representation appropriate to the host environment's current locale. */
|
|
99
114
|
toLocaleString(
|
|
@@ -117,14 +132,20 @@ interface BigIntConstructor {
|
|
|
117
132
|
* @param bits The number of low bits to use
|
|
118
133
|
* @param int The BigInt whose bits to extract
|
|
119
134
|
*/
|
|
120
|
-
asIntN(
|
|
135
|
+
asIntN(
|
|
136
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
137
|
+
int: bigint,
|
|
138
|
+
): bigint;
|
|
121
139
|
/**
|
|
122
140
|
* Interprets the low bits of a BigInt as an unsigned integer.
|
|
123
141
|
* All higher bits are discarded.
|
|
124
142
|
* @param bits The number of low bits to use
|
|
125
143
|
* @param int The BigInt whose bits to extract
|
|
126
144
|
*/
|
|
127
|
-
asUintN(
|
|
145
|
+
asUintN(
|
|
146
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
147
|
+
int: bigint,
|
|
148
|
+
): bigint;
|
|
128
149
|
}
|
|
129
150
|
|
|
130
151
|
declare const BigInt: BigIntConstructor;
|
package/libs/es5/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare function eval(x: string): unknown;
|
|
|
26
26
|
*/
|
|
27
27
|
declare function parseInt(
|
|
28
28
|
string: string,
|
|
29
|
-
radix?: import('ts-type-forge').
|
|
29
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
30
30
|
): number;
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -632,27 +632,31 @@ interface Number {
|
|
|
632
632
|
* Returns a string representation of an object.
|
|
633
633
|
* @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
|
|
634
634
|
*/
|
|
635
|
-
toString(radix?: import('ts-type-forge').
|
|
635
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
638
|
* Returns a string representing a number in fixed-point notation.
|
|
639
639
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
640
640
|
*/
|
|
641
|
-
toFixed(
|
|
641
|
+
toFixed(
|
|
642
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
643
|
+
): string;
|
|
642
644
|
|
|
643
645
|
/**
|
|
644
646
|
* Returns a string containing a number represented in exponential notation.
|
|
645
647
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
646
648
|
*/
|
|
647
649
|
toExponential(
|
|
648
|
-
fractionDigits?: import('ts-type-forge').
|
|
650
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
649
651
|
): string;
|
|
650
652
|
|
|
651
653
|
/**
|
|
652
654
|
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
|
653
655
|
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
|
|
654
656
|
*/
|
|
655
|
-
toPrecision(
|
|
657
|
+
toPrecision(
|
|
658
|
+
precision?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
659
|
+
): string;
|
|
656
660
|
|
|
657
661
|
/** Returns the primitive value of the specified object. */
|
|
658
662
|
valueOf(): number;
|
|
@@ -1256,7 +1260,7 @@ interface JSON {
|
|
|
1256
1260
|
stringify(
|
|
1257
1261
|
value: unknown,
|
|
1258
1262
|
replacer?: (this: unknown, key: string, value: unknown) => unknown,
|
|
1259
|
-
space?: string | import('ts-type-forge').
|
|
1263
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1260
1264
|
): string;
|
|
1261
1265
|
/**
|
|
1262
1266
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
@@ -1267,7 +1271,7 @@ interface JSON {
|
|
|
1267
1271
|
stringify(
|
|
1268
1272
|
value: unknown,
|
|
1269
1273
|
replacer?: readonly (number | string)[] | null,
|
|
1270
|
-
space?: string | import('ts-type-forge').
|
|
1274
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1271
1275
|
): string;
|
|
1272
1276
|
}
|
|
1273
1277
|
|
|
@@ -5645,19 +5649,19 @@ declare namespace Intl {
|
|
|
5645
5649
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
5646
5650
|
readonly useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
5647
5651
|
readonly minimumIntegerDigits?:
|
|
5648
|
-
| import('ts-type-forge').
|
|
5652
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5649
5653
|
| undefined;
|
|
5650
5654
|
readonly minimumFractionDigits?:
|
|
5651
|
-
| import('ts-type-forge').
|
|
5655
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
5652
5656
|
| undefined;
|
|
5653
5657
|
readonly maximumFractionDigits?:
|
|
5654
|
-
| import('ts-type-forge').
|
|
5658
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
5655
5659
|
| undefined;
|
|
5656
5660
|
readonly minimumSignificantDigits?:
|
|
5657
|
-
| import('ts-type-forge').
|
|
5661
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5658
5662
|
| undefined;
|
|
5659
5663
|
readonly maximumSignificantDigits?:
|
|
5660
|
-
| import('ts-type-forge').
|
|
5664
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5661
5665
|
| undefined;
|
|
5662
5666
|
}
|
|
5663
5667
|
|
|
@@ -5667,16 +5671,25 @@ declare namespace Intl {
|
|
|
5667
5671
|
readonly style: NumberFormatOptionsStyle;
|
|
5668
5672
|
readonly currency?: string;
|
|
5669
5673
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
5670
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
5675
|
+
1,
|
|
5676
|
+
21
|
|
5677
|
+
>;
|
|
5678
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5679
|
+
0,
|
|
5680
|
+
20
|
|
5681
|
+
>;
|
|
5682
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5683
|
+
0,
|
|
5684
|
+
20
|
|
5685
|
+
>;
|
|
5686
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5674
5687
|
1,
|
|
5675
|
-
|
|
5688
|
+
21
|
|
5676
5689
|
>;
|
|
5677
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
5690
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5678
5691
|
1,
|
|
5679
|
-
|
|
5692
|
+
21
|
|
5680
5693
|
>;
|
|
5681
5694
|
readonly useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
5682
5695
|
}
|
|
@@ -122,7 +122,7 @@ interface Math {
|
|
|
122
122
|
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
|
123
123
|
* @param x A numeric expression.
|
|
124
124
|
*/
|
|
125
|
-
clz32(x: number): import('ts-type-forge').
|
|
125
|
+
clz32(x: number): import('ts-type-forge').UintRangeInclusive<0, 32>;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Returns the result of 32-bit multiplication of two numbers.
|
|
@@ -315,7 +315,7 @@ interface NumberConstructor {
|
|
|
315
315
|
*/
|
|
316
316
|
parseInt(
|
|
317
317
|
string: string,
|
|
318
|
-
radix?: import('ts-type-forge').
|
|
318
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
319
319
|
): import('ts-type-forge').Int | import('ts-type-forge').NaNType;
|
|
320
320
|
}
|
|
321
321
|
|
|
@@ -9,19 +9,19 @@ declare namespace Intl {
|
|
|
9
9
|
readonly localeMatcher?: 'lookup' | 'best fit' | undefined;
|
|
10
10
|
readonly type?: PluralRuleType | undefined;
|
|
11
11
|
readonly minimumIntegerDigits?:
|
|
12
|
-
| import('ts-type-forge').
|
|
12
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
13
13
|
| undefined;
|
|
14
14
|
readonly minimumFractionDigits?:
|
|
15
|
-
| import('ts-type-forge').
|
|
15
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
16
16
|
| undefined;
|
|
17
17
|
readonly maximumFractionDigits?:
|
|
18
|
-
| import('ts-type-forge').
|
|
18
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
19
19
|
| undefined;
|
|
20
20
|
readonly minimumSignificantDigits?:
|
|
21
|
-
| import('ts-type-forge').
|
|
21
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
22
22
|
| undefined;
|
|
23
23
|
readonly maximumSignificantDigits?:
|
|
24
|
-
| import('ts-type-forge').
|
|
24
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
25
25
|
| undefined;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,16 +29,25 @@ declare namespace Intl {
|
|
|
29
29
|
readonly locale: string;
|
|
30
30
|
readonly pluralCategories: readonly LDMLPluralRule[];
|
|
31
31
|
readonly type: PluralRuleType;
|
|
32
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
33
|
-
readonly minimumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
34
|
-
readonly maximumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
35
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
32
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
36
33
|
1,
|
|
37
|
-
|
|
34
|
+
21
|
|
38
35
|
>;
|
|
39
|
-
readonly
|
|
36
|
+
readonly minimumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
37
|
+
0,
|
|
38
|
+
20
|
|
39
|
+
>;
|
|
40
|
+
readonly maximumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
41
|
+
0,
|
|
42
|
+
20
|
|
43
|
+
>;
|
|
44
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
45
|
+
1,
|
|
46
|
+
21
|
|
47
|
+
>;
|
|
48
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
40
49
|
1,
|
|
41
|
-
|
|
50
|
+
21
|
|
42
51
|
>;
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -47,27 +47,42 @@ interface BigIntToLocaleStringOptions {
|
|
|
47
47
|
/**
|
|
48
48
|
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
|
|
49
49
|
*/
|
|
50
|
-
readonly minimumIntegerDigits?: import('ts-type-forge').
|
|
50
|
+
readonly minimumIntegerDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
51
|
+
1,
|
|
52
|
+
21
|
|
53
|
+
>;
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
56
|
* The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information).
|
|
54
57
|
*/
|
|
55
|
-
readonly minimumFractionDigits?: import('ts-type-forge').
|
|
58
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
59
|
+
0,
|
|
60
|
+
20
|
|
61
|
+
>;
|
|
56
62
|
|
|
57
63
|
/**
|
|
58
64
|
* The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0.
|
|
59
65
|
*/
|
|
60
|
-
readonly maximumFractionDigits?: import('ts-type-forge').
|
|
66
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
67
|
+
0,
|
|
68
|
+
20
|
|
69
|
+
>;
|
|
61
70
|
|
|
62
71
|
/**
|
|
63
72
|
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
|
|
64
73
|
*/
|
|
65
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').
|
|
74
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
75
|
+
1,
|
|
76
|
+
21
|
|
77
|
+
>;
|
|
66
78
|
|
|
67
79
|
/**
|
|
68
80
|
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
|
|
69
81
|
*/
|
|
70
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
82
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
83
|
+
1,
|
|
84
|
+
21
|
|
85
|
+
>;
|
|
71
86
|
|
|
72
87
|
/**
|
|
73
88
|
* The formatting that should be displayed for the number, the defaults is "standard"
|
|
@@ -93,7 +108,7 @@ interface BigInt {
|
|
|
93
108
|
* Returns a string representation of an object.
|
|
94
109
|
* @param radix Specifies a radix for converting numeric values to strings.
|
|
95
110
|
*/
|
|
96
|
-
toString(radix?: import('ts-type-forge').
|
|
111
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
97
112
|
|
|
98
113
|
/** Returns a string representation appropriate to the host environment's current locale. */
|
|
99
114
|
toLocaleString(
|
|
@@ -117,14 +132,20 @@ interface BigIntConstructor {
|
|
|
117
132
|
* @param bits The number of low bits to use
|
|
118
133
|
* @param int The BigInt whose bits to extract
|
|
119
134
|
*/
|
|
120
|
-
asIntN(
|
|
135
|
+
asIntN(
|
|
136
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
137
|
+
int: bigint,
|
|
138
|
+
): bigint;
|
|
121
139
|
/**
|
|
122
140
|
* Interprets the low bits of a BigInt as an unsigned integer.
|
|
123
141
|
* All higher bits are discarded.
|
|
124
142
|
* @param bits The number of low bits to use
|
|
125
143
|
* @param int The BigInt whose bits to extract
|
|
126
144
|
*/
|
|
127
|
-
asUintN(
|
|
145
|
+
asUintN(
|
|
146
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
147
|
+
int: bigint,
|
|
148
|
+
): bigint;
|
|
128
149
|
}
|
|
129
150
|
|
|
130
151
|
declare const BigInt: BigIntConstructor;
|
|
@@ -26,7 +26,7 @@ declare function eval(x: string): unknown;
|
|
|
26
26
|
*/
|
|
27
27
|
declare function parseInt(
|
|
28
28
|
string: string,
|
|
29
|
-
radix?: import('ts-type-forge').
|
|
29
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
30
30
|
): import('ts-type-forge').Int | import('ts-type-forge').NaNType;
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -652,27 +652,31 @@ interface Number {
|
|
|
652
652
|
* Returns a string representation of an object.
|
|
653
653
|
* @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
|
|
654
654
|
*/
|
|
655
|
-
toString(radix?: import('ts-type-forge').
|
|
655
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
656
656
|
|
|
657
657
|
/**
|
|
658
658
|
* Returns a string representing a number in fixed-point notation.
|
|
659
659
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
660
660
|
*/
|
|
661
|
-
toFixed(
|
|
661
|
+
toFixed(
|
|
662
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
663
|
+
): string;
|
|
662
664
|
|
|
663
665
|
/**
|
|
664
666
|
* Returns a string containing a number represented in exponential notation.
|
|
665
667
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
666
668
|
*/
|
|
667
669
|
toExponential(
|
|
668
|
-
fractionDigits?: import('ts-type-forge').
|
|
670
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
669
671
|
): string;
|
|
670
672
|
|
|
671
673
|
/**
|
|
672
674
|
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
|
673
675
|
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
|
|
674
676
|
*/
|
|
675
|
-
toPrecision(
|
|
677
|
+
toPrecision(
|
|
678
|
+
precision?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
679
|
+
): string;
|
|
676
680
|
|
|
677
681
|
/** Returns the primitive value of the specified object. */
|
|
678
682
|
valueOf(): number;
|
|
@@ -1324,7 +1328,7 @@ interface JSON {
|
|
|
1324
1328
|
stringify(
|
|
1325
1329
|
value: unknown,
|
|
1326
1330
|
replacer?: (this: unknown, key: string, value: unknown) => unknown,
|
|
1327
|
-
space?: string | import('ts-type-forge').
|
|
1331
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1328
1332
|
): string;
|
|
1329
1333
|
/**
|
|
1330
1334
|
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
@@ -1335,7 +1339,7 @@ interface JSON {
|
|
|
1335
1339
|
stringify(
|
|
1336
1340
|
value: unknown,
|
|
1337
1341
|
replacer?: readonly (number | string)[] | null,
|
|
1338
|
-
space?: string | import('ts-type-forge').
|
|
1342
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1339
1343
|
): string;
|
|
1340
1344
|
}
|
|
1341
1345
|
|
|
@@ -6306,19 +6310,19 @@ declare namespace Intl {
|
|
|
6306
6310
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
6307
6311
|
readonly useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
6308
6312
|
readonly minimumIntegerDigits?:
|
|
6309
|
-
| import('ts-type-forge').
|
|
6313
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6310
6314
|
| undefined;
|
|
6311
6315
|
readonly minimumFractionDigits?:
|
|
6312
|
-
| import('ts-type-forge').
|
|
6316
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
6313
6317
|
| undefined;
|
|
6314
6318
|
readonly maximumFractionDigits?:
|
|
6315
|
-
| import('ts-type-forge').
|
|
6319
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
6316
6320
|
| undefined;
|
|
6317
6321
|
readonly minimumSignificantDigits?:
|
|
6318
|
-
| import('ts-type-forge').
|
|
6322
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6319
6323
|
| undefined;
|
|
6320
6324
|
readonly maximumSignificantDigits?:
|
|
6321
|
-
| import('ts-type-forge').
|
|
6325
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6322
6326
|
| undefined;
|
|
6323
6327
|
}
|
|
6324
6328
|
|
|
@@ -6328,16 +6332,25 @@ declare namespace Intl {
|
|
|
6328
6332
|
readonly style: NumberFormatOptionsStyle;
|
|
6329
6333
|
readonly currency?: string;
|
|
6330
6334
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
6331
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
6336
|
+
1,
|
|
6337
|
+
21
|
|
6338
|
+
>;
|
|
6339
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6340
|
+
0,
|
|
6341
|
+
20
|
|
6342
|
+
>;
|
|
6343
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6344
|
+
0,
|
|
6345
|
+
20
|
|
6346
|
+
>;
|
|
6347
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6335
6348
|
1,
|
|
6336
|
-
|
|
6349
|
+
21
|
|
6337
6350
|
>;
|
|
6338
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
6351
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6339
6352
|
1,
|
|
6340
|
-
|
|
6353
|
+
21
|
|
6341
6354
|
>;
|
|
6342
6355
|
readonly useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
6343
6356
|
}
|