summaryrefslogtreecommitdiff
path: root/deno2/js/deno.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'deno2/js/deno.d.ts')
-rw-r--r--deno2/js/deno.d.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/deno2/js/deno.d.ts b/deno2/js/deno.d.ts
index 4c797a5f6..4f8a7bc3d 100644
--- a/deno2/js/deno.d.ts
+++ b/deno2/js/deno.d.ts
@@ -1,6 +1,11 @@
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License.
type MessageCallback = (msg: ArrayBuffer) => void;
-declare function denoSub(channel: string, cb: MessageCallback): void;
-declare function denoPub(channel: string, msg: ArrayBuffer): null | ArrayBuffer;
-declare function denoPrint(x: string): void;
+
+interface Deno {
+ sub(channel: string, cb: MessageCallback): void;
+ pub(channel: string, msg: ArrayBuffer): null | ArrayBuffer;
+ print(x: string): void;
+}
+
+declare let deno: Deno;