summaryrefslogtreecommitdiff
path: root/js/lib.deno.d.ts
blob: 81e8daf4e401b11a8a4d91bf95796fab791e2dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// 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;
  mainSource: string; // TODO(ry) This shouldn't be global.
}

// Globals in the runtime environment
declare let console: Console;
declare let mainSource: string; // TODO(ry) This shouldn't be global.
declare const window: Window;