diff options
Diffstat (limited to 'js/lib.deno.d.ts')
-rw-r--r-- | js/lib.deno.d.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/js/lib.deno.d.ts b/js/lib.deno.d.ts new file mode 100644 index 000000000..fd337abb0 --- /dev/null +++ b/js/lib.deno.d.ts @@ -0,0 +1,34 @@ +// Copyright 2018 the Deno authors. All rights reserved. MIT license. + +// This file contains the default TypeScript libraries for the runtime + +/// <reference no-default-lib="true"/> + +/// <reference lib="esnext" /> + +// TODO generate `console.d.ts` and inline it in `assets.ts` and remove +// declaration of `Console` +// import { Console } from 'gen/console'; + +declare class Console { + // tslint:disable-next-line:no-any + log(...args: any[]): void; + // tslint:disable-next-line:no-any + debug(...args: any[]): void; + // tslint:disable-next-line:no-any + info(...args: any[]): void; + // tslint:disable-next-line:no-any + warn(...args: any[]): void; + // tslint:disable-next-line:no-any + error(...args: any[]): void; + // tslint:disable-next-line:no-any + assert(condition: boolean, ...args: any[]): void; +} + +interface Window { + console: Console; +} + +// Globals in the runtime environment +declare let console: Console; +declare const window: Window; |