@typescript/native-preview-darwin-arm64 7.0.0-dev.20250522.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.
Files changed (101) hide show
  1. package/LICENSE +55 -0
  2. package/NOTICE.txt +297 -0
  3. package/README.md +3 -0
  4. package/lib/lib.d.ts +22 -0
  5. package/lib/lib.decorators.d.ts +386 -0
  6. package/lib/lib.decorators.legacy.d.ts +22 -0
  7. package/lib/lib.dom.asynciterable.d.ts +41 -0
  8. package/lib/lib.dom.d.ts +28087 -0
  9. package/lib/lib.dom.iterable.d.ts +491 -0
  10. package/lib/lib.es2015.collection.d.ts +147 -0
  11. package/lib/lib.es2015.core.d.ts +597 -0
  12. package/lib/lib.es2015.d.ts +28 -0
  13. package/lib/lib.es2015.generator.d.ts +77 -0
  14. package/lib/lib.es2015.iterable.d.ts +590 -0
  15. package/lib/lib.es2015.promise.d.ts +81 -0
  16. package/lib/lib.es2015.proxy.d.ts +128 -0
  17. package/lib/lib.es2015.reflect.d.ts +144 -0
  18. package/lib/lib.es2015.symbol.d.ts +46 -0
  19. package/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  20. package/lib/lib.es2016.array.include.d.ts +116 -0
  21. package/lib/lib.es2016.d.ts +21 -0
  22. package/lib/lib.es2016.full.d.ts +23 -0
  23. package/lib/lib.es2016.intl.d.ts +31 -0
  24. package/lib/lib.es2017.arraybuffer.d.ts +21 -0
  25. package/lib/lib.es2017.d.ts +26 -0
  26. package/lib/lib.es2017.date.d.ts +31 -0
  27. package/lib/lib.es2017.full.d.ts +23 -0
  28. package/lib/lib.es2017.intl.d.ts +44 -0
  29. package/lib/lib.es2017.object.d.ts +49 -0
  30. package/lib/lib.es2017.sharedmemory.d.ts +135 -0
  31. package/lib/lib.es2017.string.d.ts +45 -0
  32. package/lib/lib.es2017.typedarrays.d.ts +53 -0
  33. package/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  34. package/lib/lib.es2018.asynciterable.d.ts +53 -0
  35. package/lib/lib.es2018.d.ts +24 -0
  36. package/lib/lib.es2018.full.d.ts +24 -0
  37. package/lib/lib.es2018.intl.d.ts +83 -0
  38. package/lib/lib.es2018.promise.d.ts +30 -0
  39. package/lib/lib.es2018.regexp.d.ts +37 -0
  40. package/lib/lib.es2019.array.d.ts +79 -0
  41. package/lib/lib.es2019.d.ts +24 -0
  42. package/lib/lib.es2019.full.d.ts +24 -0
  43. package/lib/lib.es2019.intl.d.ts +23 -0
  44. package/lib/lib.es2019.object.d.ts +33 -0
  45. package/lib/lib.es2019.string.d.ts +37 -0
  46. package/lib/lib.es2019.symbol.d.ts +24 -0
  47. package/lib/lib.es2020.bigint.d.ts +729 -0
  48. package/lib/lib.es2020.d.ts +27 -0
  49. package/lib/lib.es2020.date.d.ts +42 -0
  50. package/lib/lib.es2020.full.d.ts +24 -0
  51. package/lib/lib.es2020.intl.d.ts +474 -0
  52. package/lib/lib.es2020.number.d.ts +28 -0
  53. package/lib/lib.es2020.promise.d.ts +47 -0
  54. package/lib/lib.es2020.sharedmemory.d.ts +99 -0
  55. package/lib/lib.es2020.string.d.ts +44 -0
  56. package/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  57. package/lib/lib.es2021.d.ts +23 -0
  58. package/lib/lib.es2021.full.d.ts +24 -0
  59. package/lib/lib.es2021.intl.d.ts +166 -0
  60. package/lib/lib.es2021.promise.d.ts +48 -0
  61. package/lib/lib.es2021.string.d.ts +33 -0
  62. package/lib/lib.es2021.weakref.d.ts +78 -0
  63. package/lib/lib.es2022.array.d.ts +121 -0
  64. package/lib/lib.es2022.d.ts +25 -0
  65. package/lib/lib.es2022.error.d.ts +75 -0
  66. package/lib/lib.es2022.full.d.ts +24 -0
  67. package/lib/lib.es2022.intl.d.ts +121 -0
  68. package/lib/lib.es2022.object.d.ts +26 -0
  69. package/lib/lib.es2022.regexp.d.ts +39 -0
  70. package/lib/lib.es2022.string.d.ts +25 -0
  71. package/lib/lib.es2023.array.d.ts +924 -0
  72. package/lib/lib.es2023.collection.d.ts +21 -0
  73. package/lib/lib.es2023.d.ts +22 -0
  74. package/lib/lib.es2023.full.d.ts +24 -0
  75. package/lib/lib.es2023.intl.d.ts +56 -0
  76. package/lib/lib.es2024.arraybuffer.d.ts +65 -0
  77. package/lib/lib.es2024.collection.d.ts +29 -0
  78. package/lib/lib.es2024.d.ts +26 -0
  79. package/lib/lib.es2024.full.d.ts +24 -0
  80. package/lib/lib.es2024.object.d.ts +29 -0
  81. package/lib/lib.es2024.promise.d.ts +35 -0
  82. package/lib/lib.es2024.regexp.d.ts +25 -0
  83. package/lib/lib.es2024.sharedmemory.d.ts +68 -0
  84. package/lib/lib.es2024.string.d.ts +29 -0
  85. package/lib/lib.es5.d.ts +4585 -0
  86. package/lib/lib.es6.d.ts +23 -0
  87. package/lib/lib.esnext.array.d.ts +35 -0
  88. package/lib/lib.esnext.collection.d.ts +96 -0
  89. package/lib/lib.esnext.d.ts +25 -0
  90. package/lib/lib.esnext.decorators.d.ts +28 -0
  91. package/lib/lib.esnext.disposable.d.ts +193 -0
  92. package/lib/lib.esnext.full.d.ts +24 -0
  93. package/lib/lib.esnext.intl.d.ts +21 -0
  94. package/lib/lib.esnext.iterator.d.ts +148 -0
  95. package/lib/lib.scripthost.d.ts +322 -0
  96. package/lib/lib.webworker.asynciterable.d.ts +41 -0
  97. package/lib/lib.webworker.d.ts +9410 -0
  98. package/lib/lib.webworker.importscripts.d.ts +23 -0
  99. package/lib/lib.webworker.iterable.d.ts +288 -0
  100. package/lib/tsgo +0 -0
  101. package/package.json +41 -0
@@ -0,0 +1,23 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015" />
20
+ /// <reference lib="dom" />
21
+ /// <reference lib="dom.iterable" />
22
+ /// <reference lib="webworker.importscripts" />
23
+ /// <reference lib="scripthost" />
@@ -0,0 +1,35 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ interface ArrayConstructor {
20
+ /**
21
+ * Creates an array from an async iterator or iterable object.
22
+ * @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
23
+ */
24
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
25
+
26
+ /**
27
+ * Creates an array from an async iterator or iterable object.
28
+ *
29
+ * @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
30
+ * @param mapfn A mapping function to call on every element of itarableOrArrayLike.
31
+ * Each return value is awaited before being added to result array.
32
+ * @param thisArg Value of 'this' used when executing mapfn.
33
+ */
34
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
35
+ }
@@ -0,0 +1,96 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2024.collection" />
20
+
21
+ interface ReadonlySetLike<T> {
22
+ /**
23
+ * Despite its name, returns an iterator of the values in the set-like.
24
+ */
25
+ keys(): Iterator<T>;
26
+ /**
27
+ * @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
28
+ */
29
+ has(value: T): boolean;
30
+ /**
31
+ * @returns the number of (unique) elements in the set-like.
32
+ */
33
+ readonly size: number;
34
+ }
35
+
36
+ interface Set<T> {
37
+ /**
38
+ * @returns a new Set containing all the elements in this Set and also all the elements in the argument.
39
+ */
40
+ union<U>(other: ReadonlySetLike<U>): Set<T | U>;
41
+ /**
42
+ * @returns a new Set containing all the elements which are both in this Set and in the argument.
43
+ */
44
+ intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
45
+ /**
46
+ * @returns a new Set containing all the elements in this Set which are not also in the argument.
47
+ */
48
+ difference<U>(other: ReadonlySetLike<U>): Set<T>;
49
+ /**
50
+ * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
51
+ */
52
+ symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
53
+ /**
54
+ * @returns a boolean indicating whether all the elements in this Set are also in the argument.
55
+ */
56
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
57
+ /**
58
+ * @returns a boolean indicating whether all the elements in the argument are also in this Set.
59
+ */
60
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
61
+ /**
62
+ * @returns a boolean indicating whether this Set has no elements in common with the argument.
63
+ */
64
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
65
+ }
66
+
67
+ interface ReadonlySet<T> {
68
+ /**
69
+ * @returns a new Set containing all the elements in this Set and also all the elements in the argument.
70
+ */
71
+ union<U>(other: ReadonlySetLike<U>): Set<T | U>;
72
+ /**
73
+ * @returns a new Set containing all the elements which are both in this Set and in the argument.
74
+ */
75
+ intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
76
+ /**
77
+ * @returns a new Set containing all the elements in this Set which are not also in the argument.
78
+ */
79
+ difference<U>(other: ReadonlySetLike<U>): Set<T>;
80
+ /**
81
+ * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
82
+ */
83
+ symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
84
+ /**
85
+ * @returns a boolean indicating whether all the elements in this Set are also in the argument.
86
+ */
87
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
88
+ /**
89
+ * @returns a boolean indicating whether all the elements in the argument are also in this Set.
90
+ */
91
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
92
+ /**
93
+ * @returns a boolean indicating whether this Set has no elements in common with the argument.
94
+ */
95
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
96
+ }
@@ -0,0 +1,25 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2024" />
20
+ /// <reference lib="esnext.intl" />
21
+ /// <reference lib="esnext.decorators" />
22
+ /// <reference lib="esnext.disposable" />
23
+ /// <reference lib="esnext.collection" />
24
+ /// <reference lib="esnext.array" />
25
+ /// <reference lib="esnext.iterator" />
@@ -0,0 +1,28 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015.symbol" />
20
+ /// <reference lib="decorators" />
21
+
22
+ interface SymbolConstructor {
23
+ readonly metadata: unique symbol;
24
+ }
25
+
26
+ interface Function {
27
+ [Symbol.metadata]: DecoratorMetadata | null;
28
+ }
@@ -0,0 +1,193 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015.symbol" />
20
+ /// <reference lib="es2015.iterable" />
21
+ /// <reference lib="es2018.asynciterable" />
22
+
23
+ interface SymbolConstructor {
24
+ /**
25
+ * A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
26
+ */
27
+ readonly dispose: unique symbol;
28
+
29
+ /**
30
+ * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
31
+ */
32
+ readonly asyncDispose: unique symbol;
33
+ }
34
+
35
+ interface Disposable {
36
+ [Symbol.dispose](): void;
37
+ }
38
+
39
+ interface AsyncDisposable {
40
+ [Symbol.asyncDispose](): PromiseLike<void>;
41
+ }
42
+
43
+ interface SuppressedError extends Error {
44
+ error: any;
45
+ suppressed: any;
46
+ }
47
+
48
+ interface SuppressedErrorConstructor {
49
+ new (error: any, suppressed: any, message?: string): SuppressedError;
50
+ (error: any, suppressed: any, message?: string): SuppressedError;
51
+ readonly prototype: SuppressedError;
52
+ }
53
+ declare var SuppressedError: SuppressedErrorConstructor;
54
+
55
+ interface DisposableStack {
56
+ /**
57
+ * Returns a value indicating whether this stack has been disposed.
58
+ */
59
+ readonly disposed: boolean;
60
+ /**
61
+ * Disposes each resource in the stack in the reverse order that they were added.
62
+ */
63
+ dispose(): void;
64
+ /**
65
+ * Adds a disposable resource to the stack, returning the resource.
66
+ * @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
67
+ * @returns The provided {@link value}.
68
+ */
69
+ use<T extends Disposable | null | undefined>(value: T): T;
70
+ /**
71
+ * Adds a value and associated disposal callback as a resource to the stack.
72
+ * @param value The value to add.
73
+ * @param onDispose The callback to use in place of a `[Symbol.dispose]()` method. Will be invoked with `value`
74
+ * as the first parameter.
75
+ * @returns The provided {@link value}.
76
+ */
77
+ adopt<T>(value: T, onDispose: (value: T) => void): T;
78
+ /**
79
+ * Adds a callback to be invoked when the stack is disposed.
80
+ */
81
+ defer(onDispose: () => void): void;
82
+ /**
83
+ * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
84
+ * @example
85
+ * ```ts
86
+ * class C {
87
+ * #res1: Disposable;
88
+ * #res2: Disposable;
89
+ * #disposables: DisposableStack;
90
+ * constructor() {
91
+ * // stack will be disposed when exiting constructor for any reason
92
+ * using stack = new DisposableStack();
93
+ *
94
+ * // get first resource
95
+ * this.#res1 = stack.use(getResource1());
96
+ *
97
+ * // get second resource. If this fails, both `stack` and `#res1` will be disposed.
98
+ * this.#res2 = stack.use(getResource2());
99
+ *
100
+ * // all operations succeeded, move resources out of `stack` so that they aren't disposed
101
+ * // when constructor exits
102
+ * this.#disposables = stack.move();
103
+ * }
104
+ *
105
+ * [Symbol.dispose]() {
106
+ * this.#disposables.dispose();
107
+ * }
108
+ * }
109
+ * ```
110
+ */
111
+ move(): DisposableStack;
112
+ [Symbol.dispose](): void;
113
+ readonly [Symbol.toStringTag]: string;
114
+ }
115
+
116
+ interface DisposableStackConstructor {
117
+ new (): DisposableStack;
118
+ readonly prototype: DisposableStack;
119
+ }
120
+ declare var DisposableStack: DisposableStackConstructor;
121
+
122
+ interface AsyncDisposableStack {
123
+ /**
124
+ * Returns a value indicating whether this stack has been disposed.
125
+ */
126
+ readonly disposed: boolean;
127
+ /**
128
+ * Disposes each resource in the stack in the reverse order that they were added.
129
+ */
130
+ disposeAsync(): Promise<void>;
131
+ /**
132
+ * Adds a disposable resource to the stack, returning the resource.
133
+ * @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
134
+ * @returns The provided {@link value}.
135
+ */
136
+ use<T extends AsyncDisposable | Disposable | null | undefined>(value: T): T;
137
+ /**
138
+ * Adds a value and associated disposal callback as a resource to the stack.
139
+ * @param value The value to add.
140
+ * @param onDisposeAsync The callback to use in place of a `[Symbol.asyncDispose]()` method. Will be invoked with `value`
141
+ * as the first parameter.
142
+ * @returns The provided {@link value}.
143
+ */
144
+ adopt<T>(value: T, onDisposeAsync: (value: T) => PromiseLike<void> | void): T;
145
+ /**
146
+ * Adds a callback to be invoked when the stack is disposed.
147
+ */
148
+ defer(onDisposeAsync: () => PromiseLike<void> | void): void;
149
+ /**
150
+ * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
151
+ * @example
152
+ * ```ts
153
+ * class C {
154
+ * #res1: Disposable;
155
+ * #res2: Disposable;
156
+ * #disposables: DisposableStack;
157
+ * constructor() {
158
+ * // stack will be disposed when exiting constructor for any reason
159
+ * using stack = new DisposableStack();
160
+ *
161
+ * // get first resource
162
+ * this.#res1 = stack.use(getResource1());
163
+ *
164
+ * // get second resource. If this fails, both `stack` and `#res1` will be disposed.
165
+ * this.#res2 = stack.use(getResource2());
166
+ *
167
+ * // all operations succeeded, move resources out of `stack` so that they aren't disposed
168
+ * // when constructor exits
169
+ * this.#disposables = stack.move();
170
+ * }
171
+ *
172
+ * [Symbol.dispose]() {
173
+ * this.#disposables.dispose();
174
+ * }
175
+ * }
176
+ * ```
177
+ */
178
+ move(): AsyncDisposableStack;
179
+ [Symbol.asyncDispose](): Promise<void>;
180
+ readonly [Symbol.toStringTag]: string;
181
+ }
182
+
183
+ interface AsyncDisposableStackConstructor {
184
+ new (): AsyncDisposableStack;
185
+ readonly prototype: AsyncDisposableStack;
186
+ }
187
+ declare var AsyncDisposableStack: AsyncDisposableStackConstructor;
188
+
189
+ interface IteratorObject<T, TReturn, TNext> extends Disposable {
190
+ }
191
+
192
+ interface AsyncIteratorObject<T, TReturn, TNext> extends AsyncDisposable {
193
+ }
@@ -0,0 +1,24 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="esnext" />
20
+ /// <reference lib="dom" />
21
+ /// <reference lib="webworker.importscripts" />
22
+ /// <reference lib="scripthost" />
23
+ /// <reference lib="dom.iterable" />
24
+ /// <reference lib="dom.asynciterable" />
@@ -0,0 +1,21 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ declare namespace Intl {
20
+ // Empty
21
+ }
@@ -0,0 +1,148 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015.iterable" />
20
+
21
+ // NOTE: This is specified as what is essentially an unreachable module. All actual global declarations can be found
22
+ // in the `declare global` section, below. This is necessary as there is currently no way to declare an `abstract`
23
+ // member without declaring a `class`, but declaring `class Iterator<T>` globally would conflict with TypeScript's
24
+ // general purpose `Iterator<T>` interface.
25
+ export {};
26
+
27
+ // Abstract type that allows us to mark `next` as `abstract`
28
+ declare abstract class Iterator<T, TResult = undefined, TNext = unknown> { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging
29
+ abstract next(value?: TNext): IteratorResult<T, TResult>;
30
+ }
31
+
32
+ // Merge all members of `IteratorObject<T>` into `Iterator<T>`
33
+ interface Iterator<T, TResult, TNext> extends globalThis.IteratorObject<T, TResult, TNext> {}
34
+
35
+ // Capture the `Iterator` constructor in a type we can use in the `extends` clause of `IteratorConstructor`.
36
+ type IteratorObjectConstructor = typeof Iterator;
37
+
38
+ declare global {
39
+ // Global `IteratorObject<T, TReturn, TNext>` interface that can be augmented by polyfills
40
+ interface IteratorObject<T, TReturn, TNext> {
41
+ /**
42
+ * Returns this iterator.
43
+ */
44
+ [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
45
+
46
+ /**
47
+ * Creates an iterator whose values are the result of applying the callback to the values from this iterator.
48
+ * @param callbackfn A function that accepts up to two arguments to be used to transform values from the underlying iterator.
49
+ */
50
+ map<U>(callbackfn: (value: T, index: number) => U): IteratorObject<U, undefined, unknown>;
51
+
52
+ /**
53
+ * Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
54
+ * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
55
+ */
56
+ filter<S extends T>(predicate: (value: T, index: number) => value is S): IteratorObject<S, undefined, unknown>;
57
+
58
+ /**
59
+ * Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
60
+ * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
61
+ */
62
+ filter(predicate: (value: T, index: number) => unknown): IteratorObject<T, undefined, unknown>;
63
+
64
+ /**
65
+ * Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached.
66
+ * @param limit The maximum number of values to yield.
67
+ */
68
+ take(limit: number): IteratorObject<T, undefined, unknown>;
69
+
70
+ /**
71
+ * Creates an iterator whose values are the values from this iterator after skipping the provided count.
72
+ * @param count The number of values to drop.
73
+ */
74
+ drop(count: number): IteratorObject<T, undefined, unknown>;
75
+
76
+ /**
77
+ * Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables.
78
+ * @param callback A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result.
79
+ */
80
+ flatMap<U>(callback: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>): IteratorObject<U, undefined, unknown>;
81
+
82
+ /**
83
+ * Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
84
+ * @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
85
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
86
+ */
87
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
88
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
89
+
90
+ /**
91
+ * Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
92
+ * @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
93
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
94
+ */
95
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
96
+
97
+ /**
98
+ * Creates a new array from the values yielded by this iterator.
99
+ */
100
+ toArray(): T[];
101
+
102
+ /**
103
+ * Performs the specified action for each element in the iterator.
104
+ * @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator.
105
+ */
106
+ forEach(callbackfn: (value: T, index: number) => void): void;
107
+
108
+ /**
109
+ * Determines whether the specified callback function returns true for any element of this iterator.
110
+ * @param predicate A function that accepts up to two arguments. The some method calls
111
+ * the predicate function for each element in this iterator until the predicate returns a value
112
+ * true, or until the end of the iterator.
113
+ */
114
+ some(predicate: (value: T, index: number) => unknown): boolean;
115
+
116
+ /**
117
+ * Determines whether all the members of this iterator satisfy the specified test.
118
+ * @param predicate A function that accepts up to two arguments. The every method calls
119
+ * the predicate function for each element in this iterator until the predicate returns
120
+ * false, or until the end of this iterator.
121
+ */
122
+ every(predicate: (value: T, index: number) => unknown): boolean;
123
+
124
+ /**
125
+ * Returns the value of the first element in this iterator where predicate is true, and undefined
126
+ * otherwise.
127
+ * @param predicate find calls predicate once for each element of this iterator, in
128
+ * order, until it finds one where predicate returns true. If such an element is found, find
129
+ * immediately returns that element value. Otherwise, find returns undefined.
130
+ */
131
+ find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
132
+ find(predicate: (value: T, index: number) => unknown): T | undefined;
133
+
134
+ readonly [Symbol.toStringTag]: string;
135
+ }
136
+
137
+ // Global `IteratorConstructor` interface that can be augmented by polyfills
138
+ interface IteratorConstructor extends IteratorObjectConstructor {
139
+ /**
140
+ * Creates a native iterator from an iterator or iterable object.
141
+ * Returns its input if the input already inherits from the built-in Iterator class.
142
+ * @param value An iterator or iterable object to convert a native iterator.
143
+ */
144
+ from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): IteratorObject<T, undefined, unknown>;
145
+ }
146
+
147
+ var Iterator: IteratorConstructor;
148
+ }