Merge pull request #13453 from Microsoft/no_dom

Stop using "dom" types
This commit is contained in:
Andy
2017-01-18 08:36:33 -08:00
committed by GitHub
4 changed files with 19 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
/// <reference path="core.ts"/>
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;
namespace ts {
export type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
export type DirectoryWatcherCallback = (fileName: string) => void;

View File

@@ -40,6 +40,19 @@ declare namespace NodeJS {
ActiveXObject: typeof ActiveXObject;
}
}
declare var window: {};
declare var XMLHttpRequest: {
new(): XMLHttpRequest;
}
interface XMLHttpRequest {
readonly readyState: number;
readonly responseText: string;
readonly status: number;
open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
send(data?: string): void;
setRequestHeader(header: string, value: string): void;
}
/* tslint:enable:no-var-keyword */
namespace Utils {

View File

@@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es5", "scripthost"],
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitThis": true,