mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-19 08:24:15 -06:00
Add default target in compiler option of project runner
This commit is contained in:
parent
4e5a3ae695
commit
436baafc72
@ -164,7 +164,8 @@ class ProjectRunner extends RunnerBase {
|
||||
mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? ts.sys.resolvePath(testCase.mapRoot) : testCase.mapRoot,
|
||||
sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? ts.sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot,
|
||||
module: moduleKind,
|
||||
noResolve: testCase.noResolve
|
||||
noResolve: testCase.noResolve,
|
||||
target: ts.ScriptTarget.ES6
|
||||
};
|
||||
}
|
||||
|
||||
@ -186,7 +187,7 @@ class ProjectRunner extends RunnerBase {
|
||||
function createCompilerHost(): ts.CompilerHost {
|
||||
return {
|
||||
getSourceFile,
|
||||
getDefaultLibFilename: options => options.target === ts.ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts",
|
||||
getDefaultLibFilename: options => Harness.Compiler.defaultLibFileName,
|
||||
writeFile,
|
||||
getCurrentDirectory,
|
||||
getCanonicalFileName: Harness.Compiler.getCanonicalFileName,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
error TS2318: Cannot find global type 'TemplateStringsArray'.
|
||||
error TS2318: Cannot find global type 'String'.
|
||||
error TS2318: Cannot find global type 'RegExp'.
|
||||
error TS2318: Cannot find global type 'Object'.
|
||||
@ -9,6 +10,7 @@ error TS2318: Cannot find global type 'Array'.
|
||||
test.ts(3,8): error TS2304: Cannot find name 'Array'.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'TemplateStringsArray'.
|
||||
!!! error TS2318: Cannot find global type 'String'.
|
||||
!!! error TS2318: Cannot find global type 'RegExp'.
|
||||
!!! error TS2318: Cannot find global type 'Object'.
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
error TS2318: Cannot find global type 'TemplateStringsArray'.
|
||||
error TS2318: Cannot find global type 'String'.
|
||||
error TS2318: Cannot find global type 'RegExp'.
|
||||
error TS2318: Cannot find global type 'Object'.
|
||||
@ -9,6 +10,7 @@ error TS2318: Cannot find global type 'Array'.
|
||||
test.ts(3,8): error TS2304: Cannot find name 'Array'.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'TemplateStringsArray'.
|
||||
!!! error TS2318: Cannot find global type 'String'.
|
||||
!!! error TS2318: Cannot find global type 'RegExp'.
|
||||
!!! error TS2318: Cannot find global type 'Object'.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user