Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using "dom" types #13453

Merged
4 commits merged into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
options += " --stripInternal";
}

options += " --target es5 --noUnusedLocals --noUnusedParameters";
options += " --target es5 --lib es5,scripthost --noUnusedLocals --noUnusedParameters";

var cmd = host + " " + compilerPath + " " + options + " ";
cmd = cmd + sources.join(" ");
Expand Down Expand Up @@ -726,7 +726,7 @@ compileFile(

// Appending exports at the end of the server library
var tsserverLibraryDefinitionFileContents =
fs.readFileSync(tsserverLibraryDefinitionFile).toString() +
fs.readFileSync(tsserverLibraryDefinitionFile).toString() +
"\r\nexport = ts;" +
"\r\nexport as namespace ts;";

Expand Down
3 changes: 3 additions & 0 deletions src/compiler/sys.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 13 additions & 0 deletions src/harness/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es5", "scripthost"],
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitThis": true,
Expand Down