Skip to content

Commit c827964

Browse files
committed
Merge branch 'EB-Forks-docs/add-tsdoc'
2 parents 15f98b6 + fbf48a8 commit c827964

File tree

1 file changed

+275
-14
lines changed

1 file changed

+275
-14
lines changed

tslib.d.ts

+275-14
Original file line numberDiff line numberDiff line change
@@ -12,93 +12,323 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1212
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1313
PERFORMANCE OF THIS SOFTWARE.
1414
***************************************************************************** */
15+
16+
/**
17+
* Used to shim class extends.
18+
*
19+
* @param d The derived class.
20+
* @param b The base class.
21+
*/
1522
export declare function __extends(d: Function, b: Function): void;
23+
24+
/**
25+
* Copy the values of all of the enumerable own properties from one or more source objects to a
26+
* target object. Returns the target object.
27+
*
28+
* @param t The target object to copy to.
29+
* @param sources One or more source objects from which to copy properties
30+
*/
1631
export declare function __assign(t: any, ...sources: any[]): any;
32+
33+
/**
34+
* Performs a rest spread on an object.
35+
*
36+
* @param t The source value.
37+
* @param propertyNames The property names excluded from the rest spread.
38+
*/
1739
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
40+
41+
/**
42+
* Applies decorators to a target object
43+
*
44+
* @param decorators The set of decorators to apply.
45+
* @param target The target object.
46+
* @param key If specified, the own property to apply the decorators to.
47+
* @param desc The property descriptor, defaults to fetching the descriptor from the target object.
48+
* @experimental
49+
*/
1850
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
51+
52+
/**
53+
* Creates an observing function decorator from a parameter decorator.
54+
*
55+
* @param paramIndex The parameter index to apply the decorator to.
56+
* @param decorator The parameter decorator to apply. Note that the return value is ignored.
57+
* @experimental
58+
*/
1959
export declare function __param(paramIndex: number, decorator: Function): Function;
60+
61+
/**
62+
* Creates a decorator that sets metadata.
63+
*
64+
* @param metadataKey The metadata key
65+
* @param metadataValue The metadata value
66+
* @experimental
67+
*/
2068
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
69+
70+
/**
71+
* Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
72+
*
73+
* @param thisArg The reference to use as the `this` value in the generator function
74+
* @param _arguments The optional arguments array
75+
* @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
76+
* @param generator The generator function
77+
*/
2178
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
79+
80+
/**
81+
* Creates an Iterator object using the body as the implementation.
82+
*
83+
* @param thisArg The reference to use as the `this` value in the function
84+
* @param body The generator state-machine based implementation.
85+
*
86+
* @see [./docs/generator.md]
87+
*/
2288
export declare function __generator(thisArg: any, body: Function): any;
89+
90+
/**
91+
* Creates bindings for all enumerable properties of `m` on `exports`
92+
*
93+
* @param m The source object
94+
* @param exports The `exports` object.
95+
*/
2396
export declare function __exportStar(m: any, o: any): void;
97+
98+
/**
99+
* Creates a value iterator from an `Iterable` or `ArrayLike` object.
100+
*
101+
* @param o The object.
102+
* @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
103+
*/
24104
export declare function __values(o: any): any;
105+
106+
/**
107+
* Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
108+
*
109+
* @param o The object to read from.
110+
* @param n The maximum number of arguments to read, defaults to `Infinity`.
111+
*/
25112
export declare function __read(o: any, n?: number): any[];
26-
/** @deprecated since TypeScript 4.2 */
113+
114+
/**
115+
* Creates an array from iterable spread.
116+
*
117+
* @param args The Iterable objects to spread.
118+
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
119+
*/
27120
export declare function __spread(...args: any[][]): any[];
28-
/** @deprecated since TypeScript 4.2 */
121+
122+
/**
123+
* Creates an array from array spread.
124+
*
125+
* @param args The ArrayLikes to spread into the resulting array.
126+
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
127+
*/
29128
export declare function __spreadArrays(...args: any[][]): any[];
129+
130+
/**
131+
* Spreads the `from` array into the `to` array.
132+
*
133+
* @param pack Replace empty elements with `undefined`.
134+
*/
30135
export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
136+
137+
/**
138+
* Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
139+
* and instead should be awaited and the resulting value passed back to the generator.
140+
*
141+
* @param v The value to await.
142+
*/
31143
export declare function __await(v: any): any;
144+
145+
/**
146+
* Converts a generator function into an async generator function, by using `yield __await`
147+
* in place of normal `await`.
148+
*
149+
* @param thisArg The reference to use as the `this` value in the generator function
150+
* @param _arguments The optional arguments array
151+
* @param generator The generator function
152+
*/
32153
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
154+
155+
/**
156+
* Used to wrap a potentially async iterator in such a way so that it wraps the result
157+
* of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
158+
*
159+
* @param o The potentially async iterator.
160+
* @returns A synchronous iterator yielding `__await` instances on every odd invocation
161+
* and returning the awaited `IteratorResult` passed to `next` every even invocation.
162+
*/
33163
export declare function __asyncDelegator(o: any): any;
164+
165+
/**
166+
* Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
167+
*
168+
* @param o The object.
169+
* @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
170+
*/
34171
export declare function __asyncValues(o: any): any;
172+
173+
/**
174+
* Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
175+
*
176+
* @param cooked The cooked possibly-sparse array.
177+
* @param raw The raw string content.
178+
*/
35179
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
180+
181+
/**
182+
* Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
183+
*
184+
* ```js
185+
* import Default, { Named, Other } from "mod";
186+
* // or
187+
* import { default as Default, Named, Other } from "mod";
188+
* ```
189+
*
190+
* @param mod The CommonJS module exports object.
191+
*/
36192
export declare function __importStar<T>(mod: T): T;
193+
194+
/**
195+
* Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
196+
*
197+
* ```js
198+
* import Default from "mod";
199+
* ```
200+
*
201+
* @param mod The CommonJS module exports object.
202+
*/
37203
export declare function __importDefault<T>(mod: T): T | { default: T };
204+
38205
/**
39-
* Reading from a private instance field
206+
* Emulates reading a private instance field.
207+
*
208+
* @param receiver The instance from which to read the private field.
209+
* @param state A WeakMap containing the private field value for an instance.
210+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
211+
*
212+
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
40213
*/
41214
export declare function __classPrivateFieldGet<T extends object, V>(
42215
receiver: T,
43216
state: { has(o: T): boolean, get(o: T): V | undefined },
44217
kind?: "f"
45218
): V;
219+
46220
/**
47-
* Reading from a private static field
221+
* Emulates reading a private static field.
222+
*
223+
* @param receiver The object from which to read the private static field.
224+
* @param state The class constructor containing the definition of the static field.
225+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
226+
* @param f The descriptor that holds the static field value.
227+
*
228+
* @throws {TypeError} If `receiver` is not `state`.
48229
*/
49230
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
50231
receiver: T,
51232
state: T,
52233
kind: "f",
53234
f: { value: V }
54235
): V;
236+
55237
/**
56-
* Reading from a private instance get accessor
238+
* Emulates evaluating a private instance "get" accessor.
239+
*
240+
* @param receiver The instance on which to evaluate the private "get" accessor.
241+
* @param state A WeakSet used to verify an instance supports the private "get" accessor.
242+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
243+
* @param f The "get" accessor function to evaluate.
244+
*
245+
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
57246
*/
58247
export declare function __classPrivateFieldGet<T extends object, V>(
59248
receiver: T,
60249
state: { has(o: T): boolean },
61250
kind: "a",
62251
f: () => V
63252
): V;
253+
64254
/**
65-
* Reading from a private static get accessor
255+
* Emulates evaluating a private static "get" accessor.
256+
*
257+
* @param receiver The object on which to evaluate the private static "get" accessor.
258+
* @param state The class constructor containing the definition of the static "get" accessor.
259+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
260+
* @param f The "get" accessor function to evaluate.
261+
*
262+
* @throws {TypeError} If `receiver` is not `state`.
66263
*/
67264
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
68265
receiver: T,
69266
state: T,
70267
kind: "a",
71268
f: () => V
72269
): V;
270+
73271
/**
74-
* Reading from a private instance method
272+
* Emulates reading a private instance method.
273+
*
274+
* @param receiver The instance from which to read a private method.
275+
* @param state A WeakSet used to verify an instance supports the private method.
276+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
277+
* @param f The function to return as the private instance method.
278+
*
279+
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
75280
*/
76281
export declare function __classPrivateFieldGet<T extends object, V extends (...args: any[]) => unknown>(
77282
receiver: T,
78283
state: { has(o: T): boolean },
79284
kind: "m",
80285
f: V
81286
): V;
287+
82288
/**
83-
* Reading from a private static method
289+
* Emulates reading a private static method.
290+
*
291+
* @param receiver The object from which to read the private static method.
292+
* @param state The class constructor containing the definition of the static method.
293+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
294+
* @param f The function to return as the private static method.
295+
*
296+
* @throws {TypeError} If `receiver` is not `state`.
84297
*/
85298
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V extends (...args: any[]) => unknown>(
86299
receiver: T,
87300
state: T,
88301
kind: "m",
89302
f: V
90303
): V;
304+
91305
/**
92-
* Writing to a private instance field
306+
* Emulates writing to a private instance field.
307+
*
308+
* @param receiver The instance on which to set a private field value.
309+
* @param state A WeakMap used to store the private field value for an instance.
310+
* @param value The value to store in the private field.
311+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
312+
*
313+
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
93314
*/
94-
export declare function __classPrivateFieldSet<T extends object, V>(
315+
export declare function __classPrivateFieldSet<T extends object, V>(
95316
receiver: T,
96317
state: { has(o: T): boolean, set(o: T, value: V): unknown },
97318
value: V,
98319
kind?: "f"
99320
): V;
321+
100322
/**
101-
* Writing to a private static field
323+
* Emulates writing to a private static field.
324+
*
325+
* @param receiver The object on which to set the private static field.
326+
* @param state The class constructor containing the definition of the private static field.
327+
* @param value The value to store in the private field.
328+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
329+
* @param f The descriptor that holds the static field value.
330+
*
331+
* @throws {TypeError} If `receiver` is not `state`.
102332
*/
103333
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
104334
receiver: T,
@@ -107,8 +337,17 @@ export declare function __classPrivateFieldSet<T extends new (...args: any[]) =>
107337
kind: "f",
108338
f: { value: V }
109339
): V;
340+
110341
/**
111-
* Writing to a private instance set accessor
342+
* Emulates writing to a private instance "set" accessor.
343+
*
344+
* @param receiver The instance on which to evaluate the private instance "set" accessor.
345+
* @param state A WeakSet used to verify an instance supports the private "set" accessor.
346+
* @param value The value to store in the private accessor.
347+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
348+
* @param f The "set" accessor function to evaluate.
349+
*
350+
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
112351
*/
113352
export declare function __classPrivateFieldSet<T extends object, V>(
114353
receiver: T,
@@ -117,8 +356,17 @@ export declare function __classPrivateFieldSet<T extends object, V>(
117356
kind: "a",
118357
f: (v: V) => void
119358
): V;
359+
120360
/**
121-
* Writing to a private static set accessor
361+
* Emulates writing to a private static "set" accessor.
362+
*
363+
* @param receiver The object on which to evaluate the private static "set" accessor.
364+
* @param state The class constructor containing the definition of the static "set" accessor.
365+
* @param value The value to store in the private field.
366+
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
367+
* @param f The "set" accessor function to evaluate.
368+
*
369+
* @throws {TypeError} If `receiver` is not `state`.
122370
*/
123371
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
124372
receiver: T,
@@ -127,11 +375,24 @@ export declare function __classPrivateFieldSet<T extends new (...args: any[]) =>
127375
kind: "a",
128376
f: (v: V) => void
129377
): V;
378+
130379
/**
131-
* Checking the existence of a private field/method/accessor
380+
* Checks for the existence of a private field/method/accessor.
381+
*
382+
* @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
383+
* @param receiver The object for which to test the presence of the private member.
132384
*/
133385
export declare function __classPrivateFieldIn(
134386
state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
135387
receiver: unknown,
136388
): boolean;
389+
390+
/**
391+
* Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
392+
*
393+
* @param object The local `exports` object.
394+
* @param target The object to re-export from.
395+
* @param key The property key of `target` to re-export.
396+
* @param objectKey The property key to re-export as. Defaults to `key`.
397+
*/
137398
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;

0 commit comments

Comments
 (0)