From 28078cf4412a0951f33d953470c104a2dbe1a21e Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 7 Aug 2018 13:10:18 -0700 Subject: Rename lib.deno.d.ts to lib.globals.d.ts --- js/assets.ts | 4 ++-- js/lib.deno.d.ts | 41 ----------------------------------------- js/lib.globals.d.ts | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 js/lib.deno.d.ts create mode 100644 js/lib.globals.d.ts (limited to 'js') diff --git a/js/assets.ts b/js/assets.ts index 598b4cc6b..52c33b26b 100644 --- a/js/assets.ts +++ b/js/assets.ts @@ -7,7 +7,7 @@ // tslint:disable:max-line-length import denoDts from "/js/deno.d.ts!string"; // import libDts from "/third_party/node_modules/typescript/lib/lib.d.ts!string"; -import libDenoDts from "/js/lib.deno.d.ts!string"; +import globalsDts from "/js/lib.globals.d.ts!string"; // import libDomD qts from "/third_party/node_modules/typescript/lib/lib.dom.d.ts!string"; // import libDomIterableDts from "/third_party/node_modules/typescript/lib/lib.dom.iterable.d.ts!string"; import libEs2015Dts from "/third_party/node_modules/typescript/lib/lib.es2015.d.ts!string"; @@ -46,7 +46,7 @@ import typescriptDts from "/third_party/node_modules/typescript/lib/typescript.d export const assetSourceCode: { [key: string]: string } = { "deno.d.ts": denoDts, // "lib.d.ts": libDts, - "lib.deno.d.ts": libDenoDts, + "lib.globals.d.ts": globalsDts, // "lib.dom.d.ts": libDomDts, // "lib.dom.iterable.d.ts": libDomIterableDts, "lib.es2015.collection.d.ts": libEs2015CollectionDts, diff --git a/js/lib.deno.d.ts b/js/lib.deno.d.ts deleted file mode 100644 index b11a08edf..000000000 --- a/js/lib.deno.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2018 the Deno authors. All rights reserved. MIT license. - -// This file contains the default TypeScript libraries for the runtime - -/// - -/// - -// 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; - // TODO(ry) These shouldn't be global. - mainSource: string; - setMainSourceMap(sm: string): void; -} - -// Globals in the runtime environment -declare let console: Console; -declare const window: Window; - -// TODO(ry) These shouldn't be global. -declare let mainSource: string; -declare function setMainSourceMap(sm: string): void; diff --git a/js/lib.globals.d.ts b/js/lib.globals.d.ts new file mode 100644 index 000000000..b11a08edf --- /dev/null +++ b/js/lib.globals.d.ts @@ -0,0 +1,41 @@ +// Copyright 2018 the Deno authors. All rights reserved. MIT license. + +// This file contains the default TypeScript libraries for the runtime + +/// + +/// + +// 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; + // TODO(ry) These shouldn't be global. + mainSource: string; + setMainSourceMap(sm: string): void; +} + +// Globals in the runtime environment +declare let console: Console; +declare const window: Window; + +// TODO(ry) These shouldn't be global. +declare let mainSource: string; +declare function setMainSourceMap(sm: string): void; -- cgit v1.2.3