Implement --lib flag in the compiler and harness

This commit is contained in:
Kanchalai Tanglertsampan
2016-03-28 14:20:29 -07:00
parent 168118f12b
commit 3fef5ba458
13 changed files with 206 additions and 97 deletions

View File

@@ -281,6 +281,7 @@ module ts {
return hasProperty(files, path) ? createSourceFile(fileName, files[path], languageVersion) : undefined;
},
getDefaultLibFileName: () => "lib.d.ts",
getUserDefinedLibFileName: options => [],
writeFile: (fileName, content): void => { throw new Error("NotImplemented"); },
getCurrentDirectory: () => currentDirectory,
getCanonicalFileName: fileName => fileName.toLowerCase(),
@@ -364,6 +365,7 @@ export = C;
return hasProperty(files, path) ? createSourceFile(fileName, files[path], languageVersion) : undefined;
},
getDefaultLibFileName: () => "lib.d.ts",
getUserDefinedLibFileName: options => [],
writeFile: (fileName, content): void => { throw new Error("NotImplemented"); },
getCurrentDirectory: () => currentDirectory,
getCanonicalFileName,

View File

@@ -111,6 +111,7 @@ module ts {
getDefaultLibFileName(): string {
return "lib.d.ts"
},
getUserDefinedLibFileName: options => [],
writeFile(file, text) {
throw new Error("NYI");
},