strict-ts-lib-v5.2-branded 0.4.0
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/README.md +30 -0
- package/libs/decorators/index.d.ts +364 -0
- package/libs/decorators/legacy/index.d.ts +19 -0
- package/libs/dom/index.d.ts +35081 -0
- package/libs/dom/iterable/index.d.ts +743 -0
- package/libs/es2015/collection/index.d.ts +148 -0
- package/libs/es2015/core/index.d.ts +639 -0
- package/libs/es2015/generator/index.d.ts +65 -0
- package/libs/es2015/index.d.ts +12 -0
- package/libs/es2015/iterable/index.d.ts +569 -0
- package/libs/es2015/promise/index.d.ts +74 -0
- package/libs/es2015/proxy/index.d.ts +131 -0
- package/libs/es2015/reflect/index.d.ts +145 -0
- package/libs/es2015/symbol/index.d.ts +30 -0
- package/libs/es2015/symbol-wellknown/index.d.ts +336 -0
- package/libs/es2016/array-include/index.d.ts +133 -0
- package/libs/es2016/full/index.d.ts +7 -0
- package/libs/es2016/index.d.ts +4 -0
- package/libs/es2017/date/index.d.ts +23 -0
- package/libs/es2017/full/index.d.ts +7 -0
- package/libs/es2017/index.d.ts +9 -0
- package/libs/es2017/intl/index.d.ts +28 -0
- package/libs/es2017/object/index.d.ts +115 -0
- package/libs/es2017/sharedmemory/index.d.ts +392 -0
- package/libs/es2017/string/index.d.ts +35 -0
- package/libs/es2017/typedarrays/index.d.ts +37 -0
- package/libs/es2018/asyncgenerator/index.d.ts +69 -0
- package/libs/es2018/asynciterable/index.d.ts +31 -0
- package/libs/es2018/full/index.d.ts +7 -0
- package/libs/es2018/index.d.ts +8 -0
- package/libs/es2018/intl/index.d.ts +102 -0
- package/libs/es2018/promise/index.d.ts +14 -0
- package/libs/es2018/regexp/index.d.ts +21 -0
- package/libs/es2019/array/index.d.ts +100 -0
- package/libs/es2019/full/index.d.ts +7 -0
- package/libs/es2019/index.d.ts +8 -0
- package/libs/es2019/intl/index.d.ts +7 -0
- package/libs/es2019/object/index.d.ts +141 -0
- package/libs/es2019/string/index.d.ts +21 -0
- package/libs/es2019/symbol/index.d.ts +8 -0
- package/libs/es2020/bigint/index.d.ts +975 -0
- package/libs/es2020/date/index.d.ts +35 -0
- package/libs/es2020/full/index.d.ts +7 -0
- package/libs/es2020/index.d.ts +11 -0
- package/libs/es2020/intl/index.d.ts +433 -0
- package/libs/es2020/number/index.d.ts +15 -0
- package/libs/es2020/promise/index.d.ts +37 -0
- package/libs/es2020/sharedmemory/index.d.ts +171 -0
- package/libs/es2020/string/index.d.ts +12 -0
- package/libs/es2020/symbol-wellknown/index.d.ts +21 -0
- package/libs/es2021/full/index.d.ts +7 -0
- package/libs/es2021/index.d.ts +7 -0
- package/libs/es2021/intl/index.d.ts +165 -0
- package/libs/es2021/promise/index.d.ts +34 -0
- package/libs/es2021/string/index.d.ts +20 -0
- package/libs/es2021/weakref/index.d.ts +60 -0
- package/libs/es2022/array/index.d.ts +127 -0
- package/libs/es2022/error/index.d.ts +57 -0
- package/libs/es2022/full/index.d.ts +7 -0
- package/libs/es2022/index.d.ts +10 -0
- package/libs/es2022/intl/index.d.ts +115 -0
- package/libs/es2022/object/index.d.ts +41 -0
- package/libs/es2022/regexp/index.d.ts +28 -0
- package/libs/es2022/sharedmemory/index.d.ts +37 -0
- package/libs/es2022/string/index.d.ts +9 -0
- package/libs/es2023/array/index.d.ts +1097 -0
- package/libs/es2023/collection/index.d.ts +5 -0
- package/libs/es2023/full/index.d.ts +7 -0
- package/libs/es2023/index.d.ts +5 -0
- package/libs/es5/index.d.ts +6397 -0
- package/libs/es6/index.d.ts +7 -0
- package/libs/esnext/decorators/index.d.ts +12 -0
- package/libs/esnext/disposable/index.d.ts +169 -0
- package/libs/esnext/full/index.d.ts +7 -0
- package/libs/esnext/index.d.ts +6 -0
- package/libs/esnext/intl/index.d.ts +15 -0
- package/libs/scripthost/index.d.ts +310 -0
- package/libs/webworker/importscripts/index.d.ts +7 -0
- package/libs/webworker/index.d.ts +11649 -0
- package/libs/webworker/iterable/index.d.ts +538 -0
- package/package.json +23 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface Array<T> {
|
|
4
|
+
/**
|
|
5
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
6
|
+
* @param searchElement The element to search for.
|
|
7
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
8
|
+
*/
|
|
9
|
+
includes(
|
|
10
|
+
searchElement: T | (import('ts-type-forge').WidenLiteral<T> & {}),
|
|
11
|
+
fromIndex?: NumberType.ArraySizeArg,
|
|
12
|
+
): searchElement is T;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface ReadonlyArray<T> {
|
|
16
|
+
/**
|
|
17
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
18
|
+
* @param searchElement The element to search for.
|
|
19
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
20
|
+
*/
|
|
21
|
+
includes(
|
|
22
|
+
searchElement: T | (import('ts-type-forge').WidenLiteral<T> & {}),
|
|
23
|
+
fromIndex?: NumberType.ArraySizeArg,
|
|
24
|
+
): searchElement is T;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Int8Array {
|
|
28
|
+
/**
|
|
29
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
30
|
+
* @param searchElement The element to search for.
|
|
31
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
32
|
+
*/
|
|
33
|
+
includes(
|
|
34
|
+
searchElement: import('ts-type-forge').Int8,
|
|
35
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
36
|
+
): boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface Uint8Array {
|
|
40
|
+
/**
|
|
41
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
42
|
+
* @param searchElement The element to search for.
|
|
43
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
44
|
+
*/
|
|
45
|
+
includes(
|
|
46
|
+
searchElement: import('ts-type-forge').Uint8,
|
|
47
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
48
|
+
): boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface Uint8ClampedArray {
|
|
52
|
+
/**
|
|
53
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
54
|
+
* @param searchElement The element to search for.
|
|
55
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
56
|
+
*/
|
|
57
|
+
includes(
|
|
58
|
+
searchElement: import('ts-type-forge').Uint8,
|
|
59
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
60
|
+
): boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface Int16Array {
|
|
64
|
+
/**
|
|
65
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
66
|
+
* @param searchElement The element to search for.
|
|
67
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
68
|
+
*/
|
|
69
|
+
includes(
|
|
70
|
+
searchElement: import('ts-type-forge').Int16,
|
|
71
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
72
|
+
): boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface Uint16Array {
|
|
76
|
+
/**
|
|
77
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
78
|
+
* @param searchElement The element to search for.
|
|
79
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
80
|
+
*/
|
|
81
|
+
includes(
|
|
82
|
+
searchElement: import('ts-type-forge').Uint16,
|
|
83
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
84
|
+
): boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface Int32Array {
|
|
88
|
+
/**
|
|
89
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
90
|
+
* @param searchElement The element to search for.
|
|
91
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
92
|
+
*/
|
|
93
|
+
includes(
|
|
94
|
+
searchElement: import('ts-type-forge').Int32,
|
|
95
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
96
|
+
): boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface Uint32Array {
|
|
100
|
+
/**
|
|
101
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
102
|
+
* @param searchElement The element to search for.
|
|
103
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
104
|
+
*/
|
|
105
|
+
includes(
|
|
106
|
+
searchElement: import('ts-type-forge').Uint32,
|
|
107
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
108
|
+
): boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface Float32Array {
|
|
112
|
+
/**
|
|
113
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
114
|
+
* @param searchElement The element to search for.
|
|
115
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
116
|
+
*/
|
|
117
|
+
includes(
|
|
118
|
+
searchElement: import('ts-type-forge').Float32,
|
|
119
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
120
|
+
): boolean;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface Float64Array {
|
|
124
|
+
/**
|
|
125
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
126
|
+
* @param searchElement The element to search for.
|
|
127
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
128
|
+
*/
|
|
129
|
+
includes(
|
|
130
|
+
searchElement: import('ts-type-forge').Float64,
|
|
131
|
+
fromIndex?: NumberType.TypedArraySizeArg,
|
|
132
|
+
): boolean;
|
|
133
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface DateConstructor {
|
|
4
|
+
/**
|
|
5
|
+
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
|
6
|
+
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
|
|
7
|
+
* @param monthIndex The month as a number between 0 and 11 (January to December).
|
|
8
|
+
* @param date The date as a number between 1 and 31.
|
|
9
|
+
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
10
|
+
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
|
|
11
|
+
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
|
12
|
+
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
|
13
|
+
*/
|
|
14
|
+
UTC(
|
|
15
|
+
year: NumberType.YearEnum,
|
|
16
|
+
monthIndex?: import('ts-type-forge').MonthIndexEnum,
|
|
17
|
+
date?: import('ts-type-forge').DateEnum,
|
|
18
|
+
hours?: import('ts-type-forge').HoursEnum,
|
|
19
|
+
minutes?: import('ts-type-forge').MinutesEnum,
|
|
20
|
+
seconds?: import('ts-type-forge').SecondsEnum,
|
|
21
|
+
ms?: import('ts-type-forge').MillisecondsEnum,
|
|
22
|
+
): import('ts-type-forge').SafeUint;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2016" />
|
|
4
|
+
/// <reference lib="es2017.object" />
|
|
5
|
+
/// <reference lib="es2017.sharedmemory" />
|
|
6
|
+
/// <reference lib="es2017.string" />
|
|
7
|
+
/// <reference lib="es2017.intl" />
|
|
8
|
+
/// <reference lib="es2017.typedarrays" />
|
|
9
|
+
/// <reference lib="es2017.date" />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
declare namespace Intl {
|
|
4
|
+
interface DateTimeFormatPartTypesRegistry {
|
|
5
|
+
readonly day: unknown;
|
|
6
|
+
readonly dayPeriod: unknown;
|
|
7
|
+
readonly era: unknown;
|
|
8
|
+
readonly hour: unknown;
|
|
9
|
+
readonly literal: unknown;
|
|
10
|
+
readonly minute: unknown;
|
|
11
|
+
readonly month: unknown;
|
|
12
|
+
readonly second: unknown;
|
|
13
|
+
readonly timeZoneName: unknown;
|
|
14
|
+
readonly weekday: unknown;
|
|
15
|
+
readonly year: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
|
|
19
|
+
|
|
20
|
+
interface DateTimeFormatPart {
|
|
21
|
+
readonly type: DateTimeFormatPartTypes;
|
|
22
|
+
readonly value: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface DateTimeFormat {
|
|
26
|
+
formatToParts(date?: Date | number): readonly DateTimeFormatPart[];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
declare namespace StrictLibInternals {
|
|
4
|
+
/**
|
|
5
|
+
* Opens a union of string literals so that it still accepts — and
|
|
6
|
+
* completes to — the literals, without rejecting the excess keys a
|
|
7
|
+
* wider object may carry.
|
|
8
|
+
*
|
|
9
|
+
* Adds nothing when `K` already contains `string`: `string | (string & {})`
|
|
10
|
+
* *is* `string`, so the arm would only leave a confusing artifact in
|
|
11
|
+
* every type computed from it.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
type WithOpenString<K> = string extends K ? K : K | (string & {});
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
type ToObjectKeys<R extends import('ts-type-forge').UnknownRecord> =
|
|
19
|
+
WithOpenString<ToStr<keyof R>>;
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
type ToStr<A> = A extends string ? A : A extends number ? `${A}` : never;
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
type PickByValue<R, V> = Pick<
|
|
26
|
+
R,
|
|
27
|
+
{
|
|
28
|
+
[K in keyof R]: R[K] extends V ? K : never;
|
|
29
|
+
}[keyof R]
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
type ToObjectEntries<R extends import('ts-type-forge').UnknownRecord> =
|
|
34
|
+
R extends R
|
|
35
|
+
? readonly (
|
|
36
|
+
| (string extends ToStr<keyof R>
|
|
37
|
+
? never
|
|
38
|
+
: readonly [
|
|
39
|
+
string & {},
|
|
40
|
+
import('ts-type-forge').WidenLiteral<
|
|
41
|
+
import('ts-type-forge').ValueOf<R>
|
|
42
|
+
>,
|
|
43
|
+
])
|
|
44
|
+
| {
|
|
45
|
+
readonly [K in keyof R]: readonly [
|
|
46
|
+
ToStr<keyof PickByValue<R, R[K]>>,
|
|
47
|
+
R[K],
|
|
48
|
+
];
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
50
|
+
}[import('ts-type-forge').RelaxedExclude<keyof R, symbol>]
|
|
51
|
+
)[]
|
|
52
|
+
: never;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ObjectConstructor {
|
|
56
|
+
/**
|
|
57
|
+
* Returns an array of values of the enumerable properties of an object
|
|
58
|
+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
59
|
+
*/
|
|
60
|
+
values<T>(o: { readonly [s: string]: T } | ArrayLike<T>): readonly T[];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Returns an array of values of the enumerable properties of an object
|
|
64
|
+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
65
|
+
*/
|
|
66
|
+
values(o: {}): readonly unknown[];
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns an array of key/values of the enumerable properties of an object
|
|
70
|
+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
71
|
+
*
|
|
72
|
+
* ```ts
|
|
73
|
+
* const obj = {
|
|
74
|
+
* x: 1,
|
|
75
|
+
* y: 2,
|
|
76
|
+
* z: 2,
|
|
77
|
+
* 3: 4,
|
|
78
|
+
* } as const;
|
|
79
|
+
*
|
|
80
|
+
* const entries = Object.entries(obj); // (['3', 4] | ['x', 1] | ['y' | 'z', 2] | [string, unknown])[]
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
entries<const R extends import('ts-type-forge').UnknownRecord>(
|
|
85
|
+
object: R,
|
|
86
|
+
): StrictLibInternals.ToObjectEntries<R>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns an array of key/values of the enumerable own properties of an
|
|
90
|
+
* object
|
|
91
|
+
*
|
|
92
|
+
* @param o Object that contains the properties and methods. This can be an
|
|
93
|
+
* object that you created or an existing Document Object Model (DOM)
|
|
94
|
+
* object.
|
|
95
|
+
*/
|
|
96
|
+
entries<T>(
|
|
97
|
+
o: { readonly [s: string]: T } | ArrayLike<T>,
|
|
98
|
+
): readonly (readonly [string, T])[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Returns an array of key/values of the enumerable properties of an object
|
|
102
|
+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
103
|
+
*/
|
|
104
|
+
entries(o: {}): readonly (readonly [string, unknown])[];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Returns an object containing all own property descriptors of an object
|
|
108
|
+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
109
|
+
*/
|
|
110
|
+
getOwnPropertyDescriptors<T>(o: T): {
|
|
111
|
+
readonly [P in keyof T]: TypedPropertyDescriptor<T[P]>;
|
|
112
|
+
} & {
|
|
113
|
+
readonly [x: string]: PropertyDescriptor;
|
|
114
|
+
};
|
|
115
|
+
}
|