summaryrefslogtreecommitdiff
path: root/extensions/webidl/internal.d.ts
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-06-15 13:46:02 +0200
committerGitHub <noreply@github.com>2021-06-15 13:46:02 +0200
commit4cbc4a7eb321ae2808cf3dce9428f45aaed0e338 (patch)
tree593fa6e34cd0d222029ea37b404dbb7dd3fad54a /extensions/webidl/internal.d.ts
parent1eac527adb8263acd6d6cc1147e53caa901d938d (diff)
fix: make WHATWG streams more compliant (#10967)
Diffstat (limited to 'extensions/webidl/internal.d.ts')
-rw-r--r--extensions/webidl/internal.d.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/extensions/webidl/internal.d.ts b/extensions/webidl/internal.d.ts
index 2d23f0ed2..4d0f1ad45 100644
--- a/extensions/webidl/internal.d.ts
+++ b/extensions/webidl/internal.d.ts
@@ -249,6 +249,24 @@ declare namespace globalThis {
): (v: any, opts: ValueConverterOpts) => T[];
/**
+ * Create a converter that converts a Promise of the inner type.
+ */
+ declare function createPromiseConverter<T>(
+ converter: (v: any, opts: ValueConverterOpts) => T,
+ ): (v: any, opts: ValueConverterOpts) => Promise<T>;
+
+ /**
+ * Invoke a callback function.
+ */
+ declare function invokeCallbackFunction<T>(
+ callable: (...args: any) => any,
+ args: any[],
+ thisArg: any,
+ returnValueConverter: (v: any, opts: ValueConverterOpts) => T,
+ opts: ConverterOpts & { returnsPromise?: boolean },
+ ): T;
+
+ /**
* Throw an illegal constructor error.
*/
declare function illegalConstructor(): never;