2019-03-26 08:22:07 -04:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
// This file contains APIs that are introduced into the global namespace by
|
|
|
|
// 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.
|
|
|
|
|
2019-06-14 13:58:20 -04:00
|
|
|
declare interface MessageCallback {
|
2019-08-07 14:02:29 -04:00
|
|
|
(opId: number, msg: Uint8Array): void;
|
2019-06-14 13:58:20 -04:00
|
|
|
}
|
2019-03-26 08:22:07 -04:00
|
|
|
|
|
|
|
declare interface DenoCore {
|
|
|
|
dispatch(
|
2019-08-07 14:02:29 -04:00
|
|
|
opId: number,
|
2019-03-26 08:22:07 -04:00
|
|
|
control: Uint8Array,
|
|
|
|
zeroCopy?: ArrayBufferView | null
|
2019-06-14 13:58:20 -04:00
|
|
|
): Uint8Array | null;
|
2019-03-26 08:22:07 -04:00
|
|
|
setAsyncHandler(cb: MessageCallback): void;
|
|
|
|
sharedQueue: {
|
|
|
|
head(): number;
|
|
|
|
numRecords(): number;
|
|
|
|
size(): number;
|
|
|
|
push(buf: Uint8Array): boolean;
|
|
|
|
reset(): void;
|
|
|
|
shift(): Uint8Array | null;
|
|
|
|
};
|
|
|
|
}
|