Skip to content

Commit

Permalink
core fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
afinch7 committed Aug 28, 2019
1 parent f4f0b6f commit 9512b2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/core.d.ts
Expand Up @@ -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;
}

declare type DenoOpListener = (id: number | undefined) => void;
Expand Down
4 changes: 3 additions & 1 deletion core/core_lib.js
Expand Up @@ -165,7 +165,9 @@ SharedQueue Binary Layout

function setAsyncHandler(opId, cb) {
maybeInit();
asyncHandlerMap[opId] = cb;
if (typeof opId === "number") {
asyncHandlerMap[opId] = cb;
}
}

function handleAsyncMsgFromRust(opId, buf) {
Expand Down
2 changes: 1 addition & 1 deletion core/libdeno/libdeno.d.ts
Expand Up @@ -13,7 +13,7 @@ interface EvalErrorInfo {
}

declare interface MessageCallback {
(opId: number, msg: Uint8Array): void;
(msg: Uint8Array): void;
}

declare interface OpRegisterCallback {
Expand Down

0 comments on commit 9512b2f

Please sign in to comment.