summaryrefslogtreecommitdiff
path: root/core/core.d.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-03-26 23:22:07 +1100
committerRyan Dahl <ry@tinyclouds.org>2019-03-26 08:22:07 -0400
commitc43cfedeba5d6ac96e1b1febed8549e750606e3f (patch)
tree7b3799259895acadf25294704ea03a9465051e9c /core/core.d.ts
parented2977d3c0e9ab3295a3bb47b844b2953d608197 (diff)
namespace reorg: libdeno and DenoCore to Deno.core (#1998)
Diffstat (limited to 'core/core.d.ts')
-rw-r--r--core/core.d.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/core.d.ts b/core/core.d.ts
new file mode 100644
index 000000000..b1d1ac57f
--- /dev/null
+++ b/core/core.d.ts
@@ -0,0 +1,25 @@
+// 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.
+
+declare interface MessageCallback {
+ (msg: Uint8Array): void;
+}
+
+declare interface DenoCore {
+ dispatch(
+ control: Uint8Array,
+ zeroCopy?: ArrayBufferView | null
+ ): Uint8Array | null;
+ setAsyncHandler(cb: MessageCallback): void;
+ sharedQueue: {
+ head(): number;
+ numRecords(): number;
+ size(): number;
+ push(buf: Uint8Array): boolean;
+ reset(): void;
+ shift(): Uint8Array | null;
+ };
+}