summaryrefslogtreecommitdiff
path: root/js/deno.d.ts
blob: a54dab851a7482bc3c68e255fa10f3ff34779194 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License.
type MessageCallback = (msg: Uint8Array) => void;

interface Deno {
  recv(cb: MessageCallback): void;
  send(msg: ArrayBufferView): null | Uint8Array;
  print(x: string): void;
}

declare let deno: Deno;