Skip to content

Commit 71fcb29

Browse files
author
Andy
authored
Merge pull request #13453 from Microsoft/no_dom
Stop using "dom" types
2 parents ae8fd30 + 9ebdd30 commit 71fcb29

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

Jakefile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
456456
options += " --stripInternal";
457457
}
458458

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

461461
var cmd = host + " " + compilerPath + " " + options + " ";
462462
cmd = cmd + sources.join(" ");
@@ -726,7 +726,7 @@ compileFile(
726726

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

src/compiler/sys.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/// <reference path="core.ts"/>
22

3+
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
4+
declare function clearTimeout(handle: any): void;
5+
36
namespace ts {
47
export type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
58
export type DirectoryWatcherCallback = (fileName: string) => void;

src/harness/harness.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ declare namespace NodeJS {
4040
ActiveXObject: typeof ActiveXObject;
4141
}
4242
}
43+
44+
declare var window: {};
45+
declare var XMLHttpRequest: {
46+
new(): XMLHttpRequest;
47+
}
48+
interface XMLHttpRequest {
49+
readonly readyState: number;
50+
readonly responseText: string;
51+
readonly status: number;
52+
open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
53+
send(data?: string): void;
54+
setRequestHeader(header: string, value: string): void;
55+
}
4356
/* tslint:enable:no-var-keyword */
4457

4558
namespace Utils {

src/tsconfig-base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"lib": ["es5", "scripthost"],
34
"noEmitOnError": true,
45
"noImplicitAny": true,
56
"noImplicitThis": true,

0 commit comments

Comments
 (0)