summaryrefslogtreecommitdiff
path: root/typings/primordials.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'typings/primordials.d.ts')
-rw-r--r--typings/primordials.d.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/typings/primordials.d.ts b/typings/primordials.d.ts
index 0436e92b1d..beed1d7b83 100644
--- a/typings/primordials.d.ts
+++ b/typings/primordials.d.ts
@@ -1,3 +1,5 @@
+import { AsyncIterator } from "internal/webstreams/util";
+
type UncurryThis<T extends (this: unknown, ...args: unknown[]) => unknown> =
(self: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
type UncurryThisStaticApply<T extends (this: unknown, ...args: unknown[]) => unknown> =
@@ -9,15 +11,15 @@ type StaticApply<T extends (this: unknown, ...args: unknown[]) => unknown> =
* Primordials are a way to safely use globals without fear of global mutation
* Generally, this means removing `this` parameter usage and instead using
* a regular parameter:
- *
+ *
* @example
- *
+ *
* ```js
* 'thing'.startsWith('hello');
* ```
- *
+ *
* becomes
- *
+ *
* ```js
* primordials.StringPrototypeStartsWith('thing', 'hello')
* ```
@@ -142,6 +144,7 @@ declare namespace primordials {
export const ArrayBufferPrototype: typeof ArrayBuffer.prototype
export const ArrayBufferIsView: typeof ArrayBuffer.isView
export const ArrayBufferPrototypeSlice: UncurryThis<typeof ArrayBuffer.prototype.slice>
+ export const AsyncIteratorPrototype: UncurryThis<typeof AsyncIterator>
export const BigInt: typeof globalThis.BigInt;
export const BigIntLength: typeof BigInt.length
export const BigIntName: typeof BigInt.name
@@ -522,5 +525,5 @@ declare namespace primordials {
export const PromiseAny: typeof Promise.any
export const PromisePrototypeThen: UncurryThis<typeof Promise.prototype.then>
export const PromisePrototypeCatch: UncurryThis<typeof Promise.prototype.catch>
- export const PromisePrototypeFinally: UncurryThis<typeof Promise.prototype.finally>
+ export const PromisePrototypeFinally: UncurryThis<typeof Promise.prototype.finally>
}