strict-ts-lib-v6.0 0.5.1 → 0.6.1
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 +53 -0
- package/libs/dom/index.d.ts +1 -4
- package/libs/es2015/core/index.d.ts +2 -2
- package/libs/es2017/object/index.d.ts +1 -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 +34 -21
- package/libs/esnext/temporal/index.d.ts +3 -6
- package/libs-branded/dom/index.d.ts +1 -4
- package/libs-branded/es2015/core/index.d.ts +2 -2
- package/libs-branded/es2017/object/index.d.ts +1 -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 +34 -21
- package/libs-branded/esnext/temporal/index.d.ts +3 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# strict-ts-lib-v6.0
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
9
|
+
## 0.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ac290c1: Leave `Exclude`, `Extract`, `Omit` and `Pick` with the constraints TypeScript
|
|
14
|
+
declares, and widen `strict-ts-lib-v7.0`'s `typescript` peer range to
|
|
15
|
+
`>=6.0.0 <8.0.0`.
|
|
16
|
+
|
|
17
|
+
Both landed on main in #1672 and #1673 but shipped no release: those changesets
|
|
18
|
+
named the bundle packages (`strict-ts-lib-v7.0` and friends) rather than the
|
|
19
|
+
`-source` harnesses this repository versions. `changeset version` bumped the
|
|
20
|
+
bundle manifests, and `strict-lib:gen:packages` — which runs next and stamps
|
|
21
|
+
each bundle with its harness's version — wrote 0.5.1 straight back over them,
|
|
22
|
+
the harnesses never having been bumped at all. Nothing errored; the version
|
|
23
|
+
simply did not move.
|
|
24
|
+
|
|
25
|
+
All twelve harnesses are named. The `fixed` group in `.changeset/config.json`
|
|
26
|
+
would align the versions from a single name, but a changeset's text reaches
|
|
27
|
+
only the packages it names — the rest get a bare version heading with nothing
|
|
28
|
+
under it. A change to the shared converter affects every series equally, so
|
|
29
|
+
every series' changelog should say so.
|
|
30
|
+
|
|
31
|
+
### `Exclude` and `Omit`
|
|
32
|
+
|
|
33
|
+
Two of the four utility types had their second argument narrowed here —
|
|
34
|
+
`Exclude<T, U extends T>` and `Omit<T, K extends keyof T>`, against upstream's
|
|
35
|
+
`Exclude<T, U>` and `Omit<T, K extends keyof any>`. `Extract` and `Pick`
|
|
36
|
+
already matched.
|
|
37
|
+
|
|
38
|
+
Narrowing makes a choice on the caller's behalf, and only one of the two
|
|
39
|
+
readings is ever right for a given call. Subtracting keys a type may not have
|
|
40
|
+
is legitimate — upstream's own declarations do it — and under the narrowed
|
|
41
|
+
constraint it is a TS2344 that nothing can fix when the declaration lives
|
|
42
|
+
inside a dependency. Making the choice explicit belongs in the caller's code,
|
|
43
|
+
which is what `eslint-plugin-ts-type-forge`'s
|
|
44
|
+
`prefer-strict-or-relaxed-utility-type` does, pointing at `StrictOmit` /
|
|
45
|
+
`RelaxedOmit` and the rest.
|
|
46
|
+
|
|
47
|
+
Only widens what is accepted, so anything that compiled still does.
|
|
48
|
+
|
|
49
|
+
### Peer range
|
|
50
|
+
|
|
51
|
+
TypeScript 6.0.3 compiles the v7.0 lib set with `skipLibCheck: false` and no
|
|
52
|
+
errors, and resolves `@typescript/lib-*` by the same package-name lookup
|
|
53
|
+
TypeScript 7 uses, so one bundle serves both compilers. Without the wider
|
|
54
|
+
declaration npm refuses to install it beside TypeScript 6.
|
|
55
|
+
|
|
3
56
|
## 0.5.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
package/libs/dom/index.d.ts
CHANGED
|
@@ -50116,10 +50116,7 @@ interface MathMLElementTagNameMap {
|
|
|
50116
50116
|
type ElementTagNameMap = HTMLElementTagNameMap &
|
|
50117
50117
|
Pick<
|
|
50118
50118
|
SVGElementTagNameMap,
|
|
50119
|
-
|
|
50120
|
-
keyof SVGElementTagNameMap,
|
|
50121
|
-
keyof HTMLElementTagNameMap
|
|
50122
|
-
>
|
|
50119
|
+
Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>
|
|
50123
50120
|
>;
|
|
50124
50121
|
|
|
50125
50122
|
declare const Audio: {
|
|
@@ -100,7 +100,7 @@ interface Math {
|
|
|
100
100
|
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
|
101
101
|
* @param x A numeric expression.
|
|
102
102
|
*/
|
|
103
|
-
clz32(x: number): import('ts-type-forge').
|
|
103
|
+
clz32(x: number): import('ts-type-forge').UintRangeInclusive<0, 32>;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Returns the result of 32-bit multiplication of two numbers.
|
|
@@ -273,7 +273,7 @@ interface NumberConstructor {
|
|
|
273
273
|
*/
|
|
274
274
|
parseInt(
|
|
275
275
|
string: string,
|
|
276
|
-
radix?: import('ts-type-forge').
|
|
276
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
277
277
|
): number;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -44,8 +44,7 @@ declare namespace StrictLibInternals {
|
|
|
44
44
|
ToStr<keyof PickByValue<R, R[K]>>,
|
|
45
45
|
R[K],
|
|
46
46
|
];
|
|
47
|
-
|
|
48
|
-
}[import('ts-type-forge').RelaxedExclude<keyof R, symbol>]
|
|
47
|
+
}[Exclude<keyof R, symbol>]
|
|
49
48
|
)[]
|
|
50
49
|
: never;
|
|
51
50
|
}
|
|
@@ -7,19 +7,19 @@ declare namespace Intl {
|
|
|
7
7
|
readonly localeMatcher?: 'lookup' | 'best fit' | undefined;
|
|
8
8
|
readonly type?: PluralRuleType | undefined;
|
|
9
9
|
readonly minimumIntegerDigits?:
|
|
10
|
-
| import('ts-type-forge').
|
|
10
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
11
11
|
| undefined;
|
|
12
12
|
readonly minimumFractionDigits?:
|
|
13
|
-
| import('ts-type-forge').
|
|
13
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
14
14
|
| undefined;
|
|
15
15
|
readonly maximumFractionDigits?:
|
|
16
|
-
| import('ts-type-forge').
|
|
16
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
17
17
|
| undefined;
|
|
18
18
|
readonly minimumSignificantDigits?:
|
|
19
|
-
| import('ts-type-forge').
|
|
19
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
20
20
|
| undefined;
|
|
21
21
|
readonly maximumSignificantDigits?:
|
|
22
|
-
| import('ts-type-forge').
|
|
22
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
23
23
|
| undefined;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -27,16 +27,25 @@ declare namespace Intl {
|
|
|
27
27
|
readonly locale: string;
|
|
28
28
|
readonly pluralCategories: readonly LDMLPluralRule[];
|
|
29
29
|
readonly type: PluralRuleType;
|
|
30
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
31
|
-
readonly minimumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
32
|
-
readonly maximumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
33
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
30
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
34
31
|
1,
|
|
35
|
-
|
|
32
|
+
21
|
|
36
33
|
>;
|
|
37
|
-
readonly
|
|
34
|
+
readonly minimumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
35
|
+
0,
|
|
36
|
+
20
|
|
37
|
+
>;
|
|
38
|
+
readonly maximumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
39
|
+
0,
|
|
40
|
+
20
|
|
41
|
+
>;
|
|
42
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
43
|
+
1,
|
|
44
|
+
21
|
|
45
|
+
>;
|
|
46
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
38
47
|
1,
|
|
39
|
-
|
|
48
|
+
21
|
|
40
49
|
>;
|
|
41
50
|
}
|
|
42
51
|
|
|
@@ -45,27 +45,42 @@ interface BigIntToLocaleStringOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
|
|
47
47
|
*/
|
|
48
|
-
readonly minimumIntegerDigits?: import('ts-type-forge').
|
|
48
|
+
readonly minimumIntegerDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
49
|
+
1,
|
|
50
|
+
21
|
|
51
|
+
>;
|
|
49
52
|
|
|
50
53
|
/**
|
|
51
54
|
* 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).
|
|
52
55
|
*/
|
|
53
|
-
readonly minimumFractionDigits?: import('ts-type-forge').
|
|
56
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
57
|
+
0,
|
|
58
|
+
20
|
|
59
|
+
>;
|
|
54
60
|
|
|
55
61
|
/**
|
|
56
62
|
* 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.
|
|
57
63
|
*/
|
|
58
|
-
readonly maximumFractionDigits?: import('ts-type-forge').
|
|
64
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
65
|
+
0,
|
|
66
|
+
20
|
|
67
|
+
>;
|
|
59
68
|
|
|
60
69
|
/**
|
|
61
70
|
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
|
|
62
71
|
*/
|
|
63
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').
|
|
72
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
73
|
+
1,
|
|
74
|
+
21
|
|
75
|
+
>;
|
|
64
76
|
|
|
65
77
|
/**
|
|
66
78
|
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
|
|
67
79
|
*/
|
|
68
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
80
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
81
|
+
1,
|
|
82
|
+
21
|
|
83
|
+
>;
|
|
69
84
|
|
|
70
85
|
/**
|
|
71
86
|
* The formatting that should be displayed for the number, the defaults is "standard"
|
|
@@ -91,7 +106,7 @@ interface BigInt {
|
|
|
91
106
|
* Returns a string representation of an object.
|
|
92
107
|
* @param radix Specifies a radix for converting numeric values to strings.
|
|
93
108
|
*/
|
|
94
|
-
toString(radix?: import('ts-type-forge').
|
|
109
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
95
110
|
|
|
96
111
|
/** Returns a string representation appropriate to the host environment's current locale. */
|
|
97
112
|
toLocaleString(
|
|
@@ -115,14 +130,20 @@ interface BigIntConstructor {
|
|
|
115
130
|
* @param bits The number of low bits to use
|
|
116
131
|
* @param int The BigInt whose bits to extract
|
|
117
132
|
*/
|
|
118
|
-
asIntN(
|
|
133
|
+
asIntN(
|
|
134
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
135
|
+
int: bigint,
|
|
136
|
+
): bigint;
|
|
119
137
|
/**
|
|
120
138
|
* Interprets the low bits of a BigInt as an unsigned integer.
|
|
121
139
|
* All higher bits are discarded.
|
|
122
140
|
* @param bits The number of low bits to use
|
|
123
141
|
* @param int The BigInt whose bits to extract
|
|
124
142
|
*/
|
|
125
|
-
asUintN(
|
|
143
|
+
asUintN(
|
|
144
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
145
|
+
int: bigint,
|
|
146
|
+
): bigint;
|
|
126
147
|
}
|
|
127
148
|
|
|
128
149
|
declare const BigInt: BigIntConstructor;
|
package/libs/es5/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare function eval(x: string): unknown;
|
|
|
24
24
|
*/
|
|
25
25
|
declare function parseInt(
|
|
26
26
|
string: string,
|
|
27
|
-
radix?: import('ts-type-forge').
|
|
27
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
28
28
|
): number;
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -630,27 +630,31 @@ interface Number {
|
|
|
630
630
|
* Returns a string representation of an object.
|
|
631
631
|
* @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
|
|
632
632
|
*/
|
|
633
|
-
toString(radix?: import('ts-type-forge').
|
|
633
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
634
634
|
|
|
635
635
|
/**
|
|
636
636
|
* Returns a string representing a number in fixed-point notation.
|
|
637
637
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
638
638
|
*/
|
|
639
|
-
toFixed(
|
|
639
|
+
toFixed(
|
|
640
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
641
|
+
): string;
|
|
640
642
|
|
|
641
643
|
/**
|
|
642
644
|
* Returns a string containing a number represented in exponential notation.
|
|
643
645
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
644
646
|
*/
|
|
645
647
|
toExponential(
|
|
646
|
-
fractionDigits?: import('ts-type-forge').
|
|
648
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
647
649
|
): string;
|
|
648
650
|
|
|
649
651
|
/**
|
|
650
652
|
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
|
651
653
|
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
|
|
652
654
|
*/
|
|
653
|
-
toPrecision(
|
|
655
|
+
toPrecision(
|
|
656
|
+
precision?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
657
|
+
): string;
|
|
654
658
|
|
|
655
659
|
/** Returns the primitive value of the specified object. */
|
|
656
660
|
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.
|
|
@@ -1268,7 +1272,7 @@ interface JSON {
|
|
|
1268
1272
|
stringify(
|
|
1269
1273
|
value: unknown,
|
|
1270
1274
|
replacer?: readonly (number | string)[] | null,
|
|
1271
|
-
space?: string | import('ts-type-forge').
|
|
1275
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1272
1276
|
): string;
|
|
1273
1277
|
}
|
|
1274
1278
|
|
|
@@ -1873,7 +1877,7 @@ type Record<K extends PropertyKey, T> = {
|
|
|
1873
1877
|
/**
|
|
1874
1878
|
* Exclude from T those types that are assignable to U
|
|
1875
1879
|
*/
|
|
1876
|
-
type Exclude<T, U
|
|
1880
|
+
type Exclude<T, U> = T extends U ? never : T;
|
|
1877
1881
|
|
|
1878
1882
|
/**
|
|
1879
1883
|
* Extract from T those types that are assignable to U
|
|
@@ -1883,7 +1887,7 @@ type Extract<T, U> = T extends U ? T : never;
|
|
|
1883
1887
|
/**
|
|
1884
1888
|
* Construct a type with the properties of T except for those in type K.
|
|
1885
1889
|
*/
|
|
1886
|
-
type Omit<T, K extends
|
|
1890
|
+
type Omit<T, K extends PropertyKey> = Pick<T, Exclude<keyof T, K>>;
|
|
1887
1891
|
|
|
1888
1892
|
/**
|
|
1889
1893
|
* Exclude null and undefined from T
|
|
@@ -5651,19 +5655,19 @@ declare namespace Intl {
|
|
|
5651
5655
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
5652
5656
|
readonly useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
5653
5657
|
readonly minimumIntegerDigits?:
|
|
5654
|
-
| import('ts-type-forge').
|
|
5658
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5655
5659
|
| undefined;
|
|
5656
5660
|
readonly minimumFractionDigits?:
|
|
5657
|
-
| import('ts-type-forge').
|
|
5661
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
5658
5662
|
| undefined;
|
|
5659
5663
|
readonly maximumFractionDigits?:
|
|
5660
|
-
| import('ts-type-forge').
|
|
5664
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
5661
5665
|
| undefined;
|
|
5662
5666
|
readonly minimumSignificantDigits?:
|
|
5663
|
-
| import('ts-type-forge').
|
|
5667
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5664
5668
|
| undefined;
|
|
5665
5669
|
readonly maximumSignificantDigits?:
|
|
5666
|
-
| import('ts-type-forge').
|
|
5670
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
5667
5671
|
| undefined;
|
|
5668
5672
|
}
|
|
5669
5673
|
|
|
@@ -5673,16 +5677,25 @@ declare namespace Intl {
|
|
|
5673
5677
|
readonly style: NumberFormatOptionsStyle;
|
|
5674
5678
|
readonly currency?: string;
|
|
5675
5679
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
5676
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
5681
|
+
1,
|
|
5682
|
+
21
|
|
5683
|
+
>;
|
|
5684
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5685
|
+
0,
|
|
5686
|
+
20
|
|
5687
|
+
>;
|
|
5688
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5689
|
+
0,
|
|
5690
|
+
20
|
|
5691
|
+
>;
|
|
5692
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5680
5693
|
1,
|
|
5681
|
-
|
|
5694
|
+
21
|
|
5682
5695
|
>;
|
|
5683
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
5696
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
5684
5697
|
1,
|
|
5685
|
-
|
|
5698
|
+
21
|
|
5686
5699
|
>;
|
|
5687
5700
|
readonly useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
5688
5701
|
}
|
|
@@ -36,12 +36,9 @@ declare namespace Temporal {
|
|
|
36
36
|
type ZonedDateTimeLike = ZonedDateTime | ZonedDateTimeLikeObject | string;
|
|
37
37
|
|
|
38
38
|
type PartialTemporalLike<T extends object> = {
|
|
39
|
-
readonly [
|
|
40
|
-
P
|
|
41
|
-
|
|
42
|
-
'calendar' | 'timeZone'
|
|
43
|
-
>
|
|
44
|
-
]?: T[P] | undefined;
|
|
39
|
+
readonly [P in Exclude<keyof T, 'calendar' | 'timeZone'>]?:
|
|
40
|
+
| T[P]
|
|
41
|
+
| undefined;
|
|
45
42
|
};
|
|
46
43
|
|
|
47
44
|
interface DateLikeObject {
|
|
@@ -50123,10 +50123,7 @@ interface MathMLElementTagNameMap {
|
|
|
50123
50123
|
type ElementTagNameMap = HTMLElementTagNameMap &
|
|
50124
50124
|
Pick<
|
|
50125
50125
|
SVGElementTagNameMap,
|
|
50126
|
-
|
|
50127
|
-
keyof SVGElementTagNameMap,
|
|
50128
|
-
keyof HTMLElementTagNameMap
|
|
50129
|
-
>
|
|
50126
|
+
Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>
|
|
50130
50127
|
>;
|
|
50131
50128
|
|
|
50132
50129
|
declare const Audio: {
|
|
@@ -120,7 +120,7 @@ interface Math {
|
|
|
120
120
|
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
|
121
121
|
* @param x A numeric expression.
|
|
122
122
|
*/
|
|
123
|
-
clz32(x: number): import('ts-type-forge').
|
|
123
|
+
clz32(x: number): import('ts-type-forge').UintRangeInclusive<0, 32>;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Returns the result of 32-bit multiplication of two numbers.
|
|
@@ -313,7 +313,7 @@ interface NumberConstructor {
|
|
|
313
313
|
*/
|
|
314
314
|
parseInt(
|
|
315
315
|
string: string,
|
|
316
|
-
radix?: import('ts-type-forge').
|
|
316
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
317
317
|
): import('ts-type-forge').Int | import('ts-type-forge').NaNType;
|
|
318
318
|
}
|
|
319
319
|
|
|
@@ -44,8 +44,7 @@ declare namespace StrictLibInternals {
|
|
|
44
44
|
ToStr<keyof PickByValue<R, R[K]>>,
|
|
45
45
|
R[K],
|
|
46
46
|
];
|
|
47
|
-
|
|
48
|
-
}[import('ts-type-forge').RelaxedExclude<keyof R, symbol>]
|
|
47
|
+
}[Exclude<keyof R, symbol>]
|
|
49
48
|
)[]
|
|
50
49
|
: never;
|
|
51
50
|
}
|
|
@@ -7,19 +7,19 @@ declare namespace Intl {
|
|
|
7
7
|
readonly localeMatcher?: 'lookup' | 'best fit' | undefined;
|
|
8
8
|
readonly type?: PluralRuleType | undefined;
|
|
9
9
|
readonly minimumIntegerDigits?:
|
|
10
|
-
| import('ts-type-forge').
|
|
10
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
11
11
|
| undefined;
|
|
12
12
|
readonly minimumFractionDigits?:
|
|
13
|
-
| import('ts-type-forge').
|
|
13
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
14
14
|
| undefined;
|
|
15
15
|
readonly maximumFractionDigits?:
|
|
16
|
-
| import('ts-type-forge').
|
|
16
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
17
17
|
| undefined;
|
|
18
18
|
readonly minimumSignificantDigits?:
|
|
19
|
-
| import('ts-type-forge').
|
|
19
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
20
20
|
| undefined;
|
|
21
21
|
readonly maximumSignificantDigits?:
|
|
22
|
-
| import('ts-type-forge').
|
|
22
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
23
23
|
| undefined;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -27,16 +27,25 @@ declare namespace Intl {
|
|
|
27
27
|
readonly locale: string;
|
|
28
28
|
readonly pluralCategories: readonly LDMLPluralRule[];
|
|
29
29
|
readonly type: PluralRuleType;
|
|
30
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
31
|
-
readonly minimumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
32
|
-
readonly maximumFractionDigits: import('ts-type-forge').UintRange<0, 21>;
|
|
33
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').UintRange<
|
|
30
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
34
31
|
1,
|
|
35
|
-
|
|
32
|
+
21
|
|
36
33
|
>;
|
|
37
|
-
readonly
|
|
34
|
+
readonly minimumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
35
|
+
0,
|
|
36
|
+
20
|
|
37
|
+
>;
|
|
38
|
+
readonly maximumFractionDigits: import('ts-type-forge').UintRangeInclusive<
|
|
39
|
+
0,
|
|
40
|
+
20
|
|
41
|
+
>;
|
|
42
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
43
|
+
1,
|
|
44
|
+
21
|
|
45
|
+
>;
|
|
46
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
38
47
|
1,
|
|
39
|
-
|
|
48
|
+
21
|
|
40
49
|
>;
|
|
41
50
|
}
|
|
42
51
|
|
|
@@ -45,27 +45,42 @@ interface BigIntToLocaleStringOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
|
|
47
47
|
*/
|
|
48
|
-
readonly minimumIntegerDigits?: import('ts-type-forge').
|
|
48
|
+
readonly minimumIntegerDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
49
|
+
1,
|
|
50
|
+
21
|
|
51
|
+
>;
|
|
49
52
|
|
|
50
53
|
/**
|
|
51
54
|
* 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).
|
|
52
55
|
*/
|
|
53
|
-
readonly minimumFractionDigits?: import('ts-type-forge').
|
|
56
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
57
|
+
0,
|
|
58
|
+
20
|
|
59
|
+
>;
|
|
54
60
|
|
|
55
61
|
/**
|
|
56
62
|
* 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.
|
|
57
63
|
*/
|
|
58
|
-
readonly maximumFractionDigits?: import('ts-type-forge').
|
|
64
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
65
|
+
0,
|
|
66
|
+
20
|
|
67
|
+
>;
|
|
59
68
|
|
|
60
69
|
/**
|
|
61
70
|
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
|
|
62
71
|
*/
|
|
63
|
-
readonly minimumSignificantDigits?: import('ts-type-forge').
|
|
72
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
73
|
+
1,
|
|
74
|
+
21
|
|
75
|
+
>;
|
|
64
76
|
|
|
65
77
|
/**
|
|
66
78
|
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
|
|
67
79
|
*/
|
|
68
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
80
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
81
|
+
1,
|
|
82
|
+
21
|
|
83
|
+
>;
|
|
69
84
|
|
|
70
85
|
/**
|
|
71
86
|
* The formatting that should be displayed for the number, the defaults is "standard"
|
|
@@ -91,7 +106,7 @@ interface BigInt {
|
|
|
91
106
|
* Returns a string representation of an object.
|
|
92
107
|
* @param radix Specifies a radix for converting numeric values to strings.
|
|
93
108
|
*/
|
|
94
|
-
toString(radix?: import('ts-type-forge').
|
|
109
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
95
110
|
|
|
96
111
|
/** Returns a string representation appropriate to the host environment's current locale. */
|
|
97
112
|
toLocaleString(
|
|
@@ -115,14 +130,20 @@ interface BigIntConstructor {
|
|
|
115
130
|
* @param bits The number of low bits to use
|
|
116
131
|
* @param int The BigInt whose bits to extract
|
|
117
132
|
*/
|
|
118
|
-
asIntN(
|
|
133
|
+
asIntN(
|
|
134
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
135
|
+
int: bigint,
|
|
136
|
+
): bigint;
|
|
119
137
|
/**
|
|
120
138
|
* Interprets the low bits of a BigInt as an unsigned integer.
|
|
121
139
|
* All higher bits are discarded.
|
|
122
140
|
* @param bits The number of low bits to use
|
|
123
141
|
* @param int The BigInt whose bits to extract
|
|
124
142
|
*/
|
|
125
|
-
asUintN(
|
|
143
|
+
asUintN(
|
|
144
|
+
bits: import('ts-type-forge').UintRangeInclusive<0, 64>,
|
|
145
|
+
int: bigint,
|
|
146
|
+
): bigint;
|
|
126
147
|
}
|
|
127
148
|
|
|
128
149
|
declare const BigInt: BigIntConstructor;
|
|
@@ -24,7 +24,7 @@ declare function eval(x: string): unknown;
|
|
|
24
24
|
*/
|
|
25
25
|
declare function parseInt(
|
|
26
26
|
string: string,
|
|
27
|
-
radix?: import('ts-type-forge').
|
|
27
|
+
radix?: import('ts-type-forge').UintRangeInclusive<2, 36>,
|
|
28
28
|
): import('ts-type-forge').Int | import('ts-type-forge').NaNType;
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -650,27 +650,31 @@ interface Number {
|
|
|
650
650
|
* Returns a string representation of an object.
|
|
651
651
|
* @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
|
|
652
652
|
*/
|
|
653
|
-
toString(radix?: import('ts-type-forge').
|
|
653
|
+
toString(radix?: import('ts-type-forge').UintRangeInclusive<2, 36>): string;
|
|
654
654
|
|
|
655
655
|
/**
|
|
656
656
|
* Returns a string representing a number in fixed-point notation.
|
|
657
657
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
658
658
|
*/
|
|
659
|
-
toFixed(
|
|
659
|
+
toFixed(
|
|
660
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<0, 100>,
|
|
661
|
+
): string;
|
|
660
662
|
|
|
661
663
|
/**
|
|
662
664
|
* Returns a string containing a number represented in exponential notation.
|
|
663
665
|
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
|
|
664
666
|
*/
|
|
665
667
|
toExponential(
|
|
666
|
-
fractionDigits?: import('ts-type-forge').
|
|
668
|
+
fractionDigits?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
667
669
|
): string;
|
|
668
670
|
|
|
669
671
|
/**
|
|
670
672
|
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
|
671
673
|
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
|
|
672
674
|
*/
|
|
673
|
-
toPrecision(
|
|
675
|
+
toPrecision(
|
|
676
|
+
precision?: import('ts-type-forge').UintRangeInclusive<1, 100>,
|
|
677
|
+
): string;
|
|
674
678
|
|
|
675
679
|
/** Returns the primitive value of the specified object. */
|
|
676
680
|
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.
|
|
@@ -1336,7 +1340,7 @@ interface JSON {
|
|
|
1336
1340
|
stringify(
|
|
1337
1341
|
value: unknown,
|
|
1338
1342
|
replacer?: readonly (number | string)[] | null,
|
|
1339
|
-
space?: string | import('ts-type-forge').
|
|
1343
|
+
space?: string | import('ts-type-forge').UintRangeInclusive<1, 10>,
|
|
1340
1344
|
): string;
|
|
1341
1345
|
}
|
|
1342
1346
|
|
|
@@ -2028,7 +2032,7 @@ type Record<K extends PropertyKey, T> = {
|
|
|
2028
2032
|
/**
|
|
2029
2033
|
* Exclude from T those types that are assignable to U
|
|
2030
2034
|
*/
|
|
2031
|
-
type Exclude<T, U
|
|
2035
|
+
type Exclude<T, U> = T extends U ? never : T;
|
|
2032
2036
|
|
|
2033
2037
|
/**
|
|
2034
2038
|
* Extract from T those types that are assignable to U
|
|
@@ -2038,7 +2042,7 @@ type Extract<T, U> = T extends U ? T : never;
|
|
|
2038
2042
|
/**
|
|
2039
2043
|
* Construct a type with the properties of T except for those in type K.
|
|
2040
2044
|
*/
|
|
2041
|
-
type Omit<T, K extends
|
|
2045
|
+
type Omit<T, K extends PropertyKey> = Pick<T, Exclude<keyof T, K>>;
|
|
2042
2046
|
|
|
2043
2047
|
/**
|
|
2044
2048
|
* Exclude null and undefined from T
|
|
@@ -6312,19 +6316,19 @@ declare namespace Intl {
|
|
|
6312
6316
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
6313
6317
|
readonly useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
6314
6318
|
readonly minimumIntegerDigits?:
|
|
6315
|
-
| import('ts-type-forge').
|
|
6319
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6316
6320
|
| undefined;
|
|
6317
6321
|
readonly minimumFractionDigits?:
|
|
6318
|
-
| import('ts-type-forge').
|
|
6322
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
6319
6323
|
| undefined;
|
|
6320
6324
|
readonly maximumFractionDigits?:
|
|
6321
|
-
| import('ts-type-forge').
|
|
6325
|
+
| import('ts-type-forge').UintRangeInclusive<0, 20>
|
|
6322
6326
|
| undefined;
|
|
6323
6327
|
readonly minimumSignificantDigits?:
|
|
6324
|
-
| import('ts-type-forge').
|
|
6328
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6325
6329
|
| undefined;
|
|
6326
6330
|
readonly maximumSignificantDigits?:
|
|
6327
|
-
| import('ts-type-forge').
|
|
6331
|
+
| import('ts-type-forge').UintRangeInclusive<1, 21>
|
|
6328
6332
|
| undefined;
|
|
6329
6333
|
}
|
|
6330
6334
|
|
|
@@ -6334,16 +6338,25 @@ declare namespace Intl {
|
|
|
6334
6338
|
readonly style: NumberFormatOptionsStyle;
|
|
6335
6339
|
readonly currency?: string;
|
|
6336
6340
|
readonly currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
6337
|
-
readonly minimumIntegerDigits: import('ts-type-forge').
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
+
readonly minimumIntegerDigits: import('ts-type-forge').UintRangeInclusive<
|
|
6342
|
+
1,
|
|
6343
|
+
21
|
|
6344
|
+
>;
|
|
6345
|
+
readonly minimumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6346
|
+
0,
|
|
6347
|
+
20
|
|
6348
|
+
>;
|
|
6349
|
+
readonly maximumFractionDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6350
|
+
0,
|
|
6351
|
+
20
|
|
6352
|
+
>;
|
|
6353
|
+
readonly minimumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6341
6354
|
1,
|
|
6342
|
-
|
|
6355
|
+
21
|
|
6343
6356
|
>;
|
|
6344
|
-
readonly maximumSignificantDigits?: import('ts-type-forge').
|
|
6357
|
+
readonly maximumSignificantDigits?: import('ts-type-forge').UintRangeInclusive<
|
|
6345
6358
|
1,
|
|
6346
|
-
|
|
6359
|
+
21
|
|
6347
6360
|
>;
|
|
6348
6361
|
readonly useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
6349
6362
|
}
|
|
@@ -36,12 +36,9 @@ declare namespace Temporal {
|
|
|
36
36
|
type ZonedDateTimeLike = ZonedDateTime | ZonedDateTimeLikeObject | string;
|
|
37
37
|
|
|
38
38
|
type PartialTemporalLike<T extends object> = {
|
|
39
|
-
readonly [
|
|
40
|
-
P
|
|
41
|
-
|
|
42
|
-
'calendar' | 'timeZone'
|
|
43
|
-
>
|
|
44
|
-
]?: T[P] | undefined;
|
|
39
|
+
readonly [P in Exclude<keyof T, 'calendar' | 'timeZone'>]?:
|
|
40
|
+
| T[P]
|
|
41
|
+
| undefined;
|
|
45
42
|
};
|
|
46
43
|
|
|
47
44
|
interface DateLikeObject {
|