diff options
author | andy finch <andyfinch7@gmail.com> | 2019-06-13 23:43:54 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-13 20:43:54 -0700 |
commit | dc60fe9f300043f191286ef804a365e16e455f87 (patch) | |
tree | c6b74e9faa6f26745b8770a18d0ae46ee34f3774 /core/core.d.ts | |
parent | fdd2eb538327ee3f50fe2869320411191830c985 (diff) |
Refactor dispatch handling (#2452)
Promise id is now created in core and passed back to JS.
Diffstat (limited to 'core/core.d.ts')
-rw-r--r-- | core/core.d.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/core.d.ts b/core/core.d.ts index b1d1ac57f..0c530e343 100644 --- a/core/core.d.ts +++ b/core/core.d.ts @@ -4,15 +4,13 @@ // Deno core. These are not intended to be used directly by runtime users of // Deno and therefore do not flow through to the runtime type library. -declare interface MessageCallback { - (msg: Uint8Array): void; -} +declare type MessageCallback = (promiseId: number, msg: Uint8Array) => void; declare interface DenoCore { dispatch( control: Uint8Array, zeroCopy?: ArrayBufferView | null - ): Uint8Array | null; + ): Uint8Array | null | number; setAsyncHandler(cb: MessageCallback): void; sharedQueue: { head(): number; |