summaryrefslogtreecommitdiff
path: root/deno_typescript
diff options
context:
space:
mode:
authorAndy Finch <andyfinch7@gmail.com>2020-01-17 08:26:11 -0500
committerRy Dahl <ry@tinyclouds.org>2020-01-17 08:26:11 -0500
commitfe5662058e0c7767e7b2724451f9d5a3f133ffbf (patch)
treebe43744898f64af6605246ba95ede55a869f7ab4 /deno_typescript
parentd8ad81d3fb5b4b9502ea021edfc99201538553e6 (diff)
feat: support individual async handler for each op (#3690)
Diffstat (limited to 'deno_typescript')
-rw-r--r--deno_typescript/lib.deno_core.d.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/deno_typescript/lib.deno_core.d.ts b/deno_typescript/lib.deno_core.d.ts
index 88a2de3c6..21ce6a67f 100644
--- a/deno_typescript/lib.deno_core.d.ts
+++ b/deno_typescript/lib.deno_core.d.ts
@@ -5,7 +5,7 @@
// Deno and therefore do not flow through to the runtime type library.
declare interface MessageCallback {
- (opId: number, msg: Uint8Array): void;
+ (msg: Uint8Array): void;
}
interface EvalErrorInfo {
@@ -27,7 +27,7 @@ declare interface DenoCore {
control: Uint8Array,
zeroCopy?: ArrayBufferView | null
): Uint8Array | null;
- setAsyncHandler(cb: MessageCallback): void;
+ setAsyncHandler(opId: number, cb: MessageCallback): void;
sharedQueue: {
head(): number;
numRecords(): number;
@@ -39,7 +39,7 @@ declare interface DenoCore {
ops(): Record<string, number>;
- recv(cb: MessageCallback): void;
+ recv(cb: (opId: number, msg: Uint8Array) => void): void;
send(
opId: number,