strict-ts-lib-v5.4 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 +28 -0
- package/libs/decorators/index.d.ts +364 -0
- package/libs/decorators/legacy/index.d.ts +19 -0
- package/libs/dom/asynciterable/index.d.ts +14 -0
- package/libs/dom/index.d.ts +35333 -0
- package/libs/dom/iterable/index.d.ts +748 -0
- package/libs/es2015/collection/index.d.ts +148 -0
- package/libs/es2015/core/index.d.ts +574 -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 +524 -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 +331 -0
- package/libs/es2016/array-include/index.d.ts +115 -0
- package/libs/es2016/full/index.d.ts +7 -0
- package/libs/es2016/index.d.ts +5 -0
- package/libs/es2016/intl/index.d.ts +15 -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 +244 -0
- package/libs/es2017/string/index.d.ts +29 -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 +8 -0
- package/libs/es2018/index.d.ts +8 -0
- package/libs/es2018/intl/index.d.ts +103 -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 +94 -0
- package/libs/es2019/full/index.d.ts +8 -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 +143 -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 +833 -0
- package/libs/es2020/date/index.d.ts +35 -0
- package/libs/es2020/full/index.d.ts +8 -0
- package/libs/es2020/index.d.ts +11 -0
- package/libs/es2020/intl/index.d.ts +473 -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 +119 -0
- package/libs/es2020/string/index.d.ts +30 -0
- package/libs/es2020/symbol-wellknown/index.d.ts +21 -0
- package/libs/es2021/full/index.d.ts +8 -0
- package/libs/es2021/index.d.ts +7 -0
- package/libs/es2021/intl/index.d.ts +161 -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 +105 -0
- package/libs/es2022/error/index.d.ts +57 -0
- package/libs/es2022/full/index.d.ts +8 -0
- package/libs/es2022/index.d.ts +10 -0
- package/libs/es2022/intl/index.d.ts +112 -0
- package/libs/es2022/object/index.d.ts +41 -0
- package/libs/es2022/regexp/index.d.ts +23 -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 +906 -0
- package/libs/es2023/collection/index.d.ts +5 -0
- package/libs/es2023/full/index.d.ts +8 -0
- package/libs/es2023/index.d.ts +5 -0
- package/libs/es5/index.d.ts +5738 -0
- package/libs/es6/index.d.ts +7 -0
- package/libs/esnext/collection/index.d.ts +13 -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 +8 -0
- package/libs/esnext/index.d.ts +9 -0
- package/libs/esnext/intl/index.d.ts +15 -0
- package/libs/esnext/object/index.d.ts +13 -0
- package/libs/esnext/promise/index.d.ts +19 -0
- package/libs/scripthost/index.d.ts +310 -0
- package/libs/webworker/asynciterable/index.d.ts +14 -0
- package/libs/webworker/importscripts/index.d.ts +7 -0
- package/libs/webworker/index.d.ts +11758 -0
- package/libs/webworker/iterable/index.d.ts +543 -0
- package/package.json +23 -0
|
@@ -0,0 +1,115 @@
|
|
|
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?: number,
|
|
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?: number,
|
|
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?: number,
|
|
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?: number,
|
|
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?: number,
|
|
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(searchElement: number, fromIndex?: number): boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface Uint16Array {
|
|
73
|
+
/**
|
|
74
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
75
|
+
* @param searchElement The element to search for.
|
|
76
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
77
|
+
*/
|
|
78
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface Int32Array {
|
|
82
|
+
/**
|
|
83
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
84
|
+
* @param searchElement The element to search for.
|
|
85
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
86
|
+
*/
|
|
87
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface Uint32Array {
|
|
91
|
+
/**
|
|
92
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
93
|
+
* @param searchElement The element to search for.
|
|
94
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
95
|
+
*/
|
|
96
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface Float32Array {
|
|
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(searchElement: number, fromIndex?: number): boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface Float64Array {
|
|
109
|
+
/**
|
|
110
|
+
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
111
|
+
* @param searchElement The element to search for.
|
|
112
|
+
* @param fromIndex The position in this array at which to begin searching for searchElement.
|
|
113
|
+
*/
|
|
114
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
|
115
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
declare namespace Intl {
|
|
4
|
+
/**
|
|
5
|
+
* The `Intl.getCanonicalLocales()` method returns an array containing
|
|
6
|
+
* the canonical locale names. Duplicates will be omitted and elements
|
|
7
|
+
* will be validated as structurally valid language tags.
|
|
8
|
+
*
|
|
9
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales)
|
|
10
|
+
*
|
|
11
|
+
* @param locale A list of String values for which to get the canonical locale names
|
|
12
|
+
* @returns An array containing the canonical and validated locale names.
|
|
13
|
+
*/
|
|
14
|
+
function getCanonicalLocales(locale?: string | readonly string[]): string[];
|
|
15
|
+
}
|
|
@@ -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: number,
|
|
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
|
+
): number;
|
|
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): 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
|
+
? (
|
|
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
|
+
[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>): 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: {}): 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 [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 [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
|
+
[P in keyof T]: TypedPropertyDescriptor<T[P]>;
|
|
112
|
+
} & {
|
|
113
|
+
[x: string]: PropertyDescriptor;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
/// <reference lib="es2015.symbol" />
|
|
4
|
+
/// <reference lib="es2015.symbol.wellknown" />
|
|
5
|
+
|
|
6
|
+
interface SharedArrayBuffer {
|
|
7
|
+
/**
|
|
8
|
+
* Read-only. The length of the ArrayBuffer (in bytes).
|
|
9
|
+
*/
|
|
10
|
+
readonly byteLength: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns a section of an SharedArrayBuffer.
|
|
14
|
+
*/
|
|
15
|
+
slice(begin: number, end?: number): SharedArrayBuffer;
|
|
16
|
+
readonly [Symbol.species]: SharedArrayBuffer;
|
|
17
|
+
readonly [Symbol.toStringTag]: 'SharedArrayBuffer';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface SharedArrayBufferConstructor {
|
|
21
|
+
readonly prototype: SharedArrayBuffer;
|
|
22
|
+
new (byteLength: number): SharedArrayBuffer;
|
|
23
|
+
}
|
|
24
|
+
declare const SharedArrayBuffer: SharedArrayBufferConstructor;
|
|
25
|
+
|
|
26
|
+
interface ArrayBufferTypes {
|
|
27
|
+
readonly SharedArrayBuffer: SharedArrayBuffer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Atomics {
|
|
31
|
+
/**
|
|
32
|
+
* Adds a value to the value at the given position in the array, returning the original value.
|
|
33
|
+
* Until this atomic operation completes, any other read or write operation against the array
|
|
34
|
+
* will block.
|
|
35
|
+
*/
|
|
36
|
+
add(
|
|
37
|
+
typedArray: Int8Array,
|
|
38
|
+
index: number,
|
|
39
|
+
value: import('ts-type-forge').Int8,
|
|
40
|
+
): import('ts-type-forge').Int8;
|
|
41
|
+
add(
|
|
42
|
+
typedArray: Uint8Array,
|
|
43
|
+
index: number,
|
|
44
|
+
value: import('ts-type-forge').Uint8,
|
|
45
|
+
): import('ts-type-forge').Uint8;
|
|
46
|
+
add(
|
|
47
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
48
|
+
index: number,
|
|
49
|
+
value: number,
|
|
50
|
+
): number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Stores the bitwise AND of a value with the value at the given position in the array,
|
|
54
|
+
* returning the original value. Until this atomic operation completes, any other read or
|
|
55
|
+
* write operation against the array will block.
|
|
56
|
+
*/
|
|
57
|
+
and(
|
|
58
|
+
typedArray: Int8Array,
|
|
59
|
+
index: number,
|
|
60
|
+
value: import('ts-type-forge').Int8,
|
|
61
|
+
): import('ts-type-forge').Int8;
|
|
62
|
+
and(
|
|
63
|
+
typedArray: Uint8Array,
|
|
64
|
+
index: number,
|
|
65
|
+
value: import('ts-type-forge').Uint8,
|
|
66
|
+
): import('ts-type-forge').Uint8;
|
|
67
|
+
and(
|
|
68
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
69
|
+
index: number,
|
|
70
|
+
value: number,
|
|
71
|
+
): number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Replaces the value at the given position in the array if the original value equals the given
|
|
75
|
+
* expected value, returning the original value. Until this atomic operation completes, any
|
|
76
|
+
* other read or write operation against the array will block.
|
|
77
|
+
*/
|
|
78
|
+
compareExchange(
|
|
79
|
+
typedArray: Int8Array,
|
|
80
|
+
index: number,
|
|
81
|
+
expectedValue: import('ts-type-forge').Int8,
|
|
82
|
+
replacementValue: import('ts-type-forge').Int8,
|
|
83
|
+
): import('ts-type-forge').Int8;
|
|
84
|
+
compareExchange(
|
|
85
|
+
typedArray: Uint8Array,
|
|
86
|
+
index: number,
|
|
87
|
+
expectedValue: import('ts-type-forge').Uint8,
|
|
88
|
+
replacementValue: import('ts-type-forge').Uint8,
|
|
89
|
+
): import('ts-type-forge').Uint8;
|
|
90
|
+
compareExchange(
|
|
91
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
92
|
+
index: number,
|
|
93
|
+
expectedValue: number,
|
|
94
|
+
replacementValue: number,
|
|
95
|
+
): number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Replaces the value at the given position in the array, returning the original value. Until
|
|
99
|
+
* this atomic operation completes, any other read or write operation against the array will
|
|
100
|
+
* block.
|
|
101
|
+
*/
|
|
102
|
+
exchange(
|
|
103
|
+
typedArray: Int8Array,
|
|
104
|
+
index: number,
|
|
105
|
+
value: import('ts-type-forge').Int8,
|
|
106
|
+
): import('ts-type-forge').Int8;
|
|
107
|
+
exchange(
|
|
108
|
+
typedArray: Uint8Array,
|
|
109
|
+
index: number,
|
|
110
|
+
value: import('ts-type-forge').Uint8,
|
|
111
|
+
): import('ts-type-forge').Uint8;
|
|
112
|
+
exchange(
|
|
113
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
114
|
+
index: number,
|
|
115
|
+
value: number,
|
|
116
|
+
): number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns a value indicating whether high-performance algorithms can use atomic operations
|
|
120
|
+
* (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed
|
|
121
|
+
* array.
|
|
122
|
+
*/
|
|
123
|
+
isLockFree(size: number): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns the value at the given position in the array. Until this atomic operation completes,
|
|
127
|
+
* any other read or write operation against the array will block.
|
|
128
|
+
*/
|
|
129
|
+
load(typedArray: Int8Array, index: number): import('ts-type-forge').Int8;
|
|
130
|
+
load(typedArray: Uint8Array, index: number): import('ts-type-forge').Uint8;
|
|
131
|
+
load(
|
|
132
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
133
|
+
index: number,
|
|
134
|
+
): number;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Stores the bitwise OR of a value with the value at the given position in the array,
|
|
138
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
139
|
+
* operation against the array will block.
|
|
140
|
+
*/
|
|
141
|
+
or(
|
|
142
|
+
typedArray: Int8Array,
|
|
143
|
+
index: number,
|
|
144
|
+
value: import('ts-type-forge').Int8,
|
|
145
|
+
): import('ts-type-forge').Int8;
|
|
146
|
+
or(
|
|
147
|
+
typedArray: Uint8Array,
|
|
148
|
+
index: number,
|
|
149
|
+
value: import('ts-type-forge').Uint8,
|
|
150
|
+
): import('ts-type-forge').Uint8;
|
|
151
|
+
or(
|
|
152
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
153
|
+
index: number,
|
|
154
|
+
value: number,
|
|
155
|
+
): number;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Stores a value at the given position in the array, returning the new value. Until this
|
|
159
|
+
* atomic operation completes, any other read or write operation against the array will block.
|
|
160
|
+
*/
|
|
161
|
+
store(
|
|
162
|
+
typedArray: Int8Array,
|
|
163
|
+
index: number,
|
|
164
|
+
value: import('ts-type-forge').Int8,
|
|
165
|
+
): import('ts-type-forge').Int8;
|
|
166
|
+
store(
|
|
167
|
+
typedArray: Uint8Array,
|
|
168
|
+
index: number,
|
|
169
|
+
value: import('ts-type-forge').Uint8,
|
|
170
|
+
): import('ts-type-forge').Uint8;
|
|
171
|
+
store(
|
|
172
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
173
|
+
index: number,
|
|
174
|
+
value: number,
|
|
175
|
+
): number;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Subtracts a value from the value at the given position in the array, returning the original
|
|
179
|
+
* value. Until this atomic operation completes, any other read or write operation against the
|
|
180
|
+
* array will block.
|
|
181
|
+
*/
|
|
182
|
+
sub(
|
|
183
|
+
typedArray: Int8Array,
|
|
184
|
+
index: number,
|
|
185
|
+
value: import('ts-type-forge').Int8,
|
|
186
|
+
): import('ts-type-forge').Int8;
|
|
187
|
+
sub(
|
|
188
|
+
typedArray: Uint8Array,
|
|
189
|
+
index: number,
|
|
190
|
+
value: import('ts-type-forge').Uint8,
|
|
191
|
+
): import('ts-type-forge').Uint8;
|
|
192
|
+
sub(
|
|
193
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
194
|
+
index: number,
|
|
195
|
+
value: number,
|
|
196
|
+
): number;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* If the value at the given position in the array is equal to the provided value, the current
|
|
200
|
+
* agent is put to sleep causing execution to suspend until the timeout expires (returning
|
|
201
|
+
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
|
|
202
|
+
* `"not-equal"`.
|
|
203
|
+
*/
|
|
204
|
+
wait(
|
|
205
|
+
typedArray: Int32Array,
|
|
206
|
+
index: number,
|
|
207
|
+
value: number,
|
|
208
|
+
timeout?: number,
|
|
209
|
+
): 'ok' | 'not-equal' | 'timed-out';
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
|
213
|
+
* number of agents that were awoken.
|
|
214
|
+
* @param typedArray A shared Int32Array.
|
|
215
|
+
* @param index The position in the typedArray to wake up on.
|
|
216
|
+
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
|
217
|
+
*/
|
|
218
|
+
notify(typedArray: Int32Array, index: number, count?: number): number;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
|
222
|
+
* returning the original value. Until this atomic operation completes, any other read or write
|
|
223
|
+
* operation against the array will block.
|
|
224
|
+
*/
|
|
225
|
+
xor(
|
|
226
|
+
typedArray: Int8Array,
|
|
227
|
+
index: number,
|
|
228
|
+
value: import('ts-type-forge').Int8,
|
|
229
|
+
): import('ts-type-forge').Int8;
|
|
230
|
+
xor(
|
|
231
|
+
typedArray: Uint8Array,
|
|
232
|
+
index: number,
|
|
233
|
+
value: import('ts-type-forge').Uint8,
|
|
234
|
+
): import('ts-type-forge').Uint8;
|
|
235
|
+
xor(
|
|
236
|
+
typedArray: Int16Array | Uint16Array | Int32Array | Uint32Array,
|
|
237
|
+
index: number,
|
|
238
|
+
value: number,
|
|
239
|
+
): number;
|
|
240
|
+
|
|
241
|
+
readonly [Symbol.toStringTag]: 'Atomics';
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare const Atomics: Atomics;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface String {
|
|
4
|
+
/**
|
|
5
|
+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
|
|
6
|
+
* The padding is applied from the start (left) of the current string.
|
|
7
|
+
*
|
|
8
|
+
* @param maxLength The length of the resulting string once the current string has been padded.
|
|
9
|
+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
|
|
10
|
+
*
|
|
11
|
+
* @param fillString The string to pad the current string with.
|
|
12
|
+
* If this string is too long, it will be truncated and the left-most part will be applied.
|
|
13
|
+
* The default value for this parameter is " " (U+0020).
|
|
14
|
+
*/
|
|
15
|
+
padStart(maxLength: number, fillString?: string): string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
|
|
19
|
+
* The padding is applied from the end (right) of the current string.
|
|
20
|
+
*
|
|
21
|
+
* @param maxLength The length of the resulting string once the current string has been padded.
|
|
22
|
+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
|
|
23
|
+
*
|
|
24
|
+
* @param fillString The string to pad the current string with.
|
|
25
|
+
* If this string is too long, it will be truncated and the left-most part will be applied.
|
|
26
|
+
* The default value for this parameter is " " (U+0020).
|
|
27
|
+
*/
|
|
28
|
+
padEnd(maxLength: number, fillString?: string): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference no-default-lib="true"/>
|
|
2
|
+
|
|
3
|
+
interface Int8ArrayConstructor {
|
|
4
|
+
new (): Int8Array;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Uint8ArrayConstructor {
|
|
8
|
+
new (): Uint8Array;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Uint8ClampedArrayConstructor {
|
|
12
|
+
new (): Uint8ClampedArray;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Int16ArrayConstructor {
|
|
16
|
+
new (): Int16Array;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Uint16ArrayConstructor {
|
|
20
|
+
new (): Uint16Array;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface Int32ArrayConstructor {
|
|
24
|
+
new (): Int32Array;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Uint32ArrayConstructor {
|
|
28
|
+
new (): Uint32Array;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface Float32ArrayConstructor {
|
|
32
|
+
new (): Float32Array;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface Float64ArrayConstructor {
|
|
36
|
+
new (): Float64Array;
|
|
37
|
+
}
|