File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
testRunner/unittests/services Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,15 @@ namespace ts {
26
26
export function transpileModule ( input : string , transpileOptions : TranspileOptions ) : TranspileOutput {
27
27
const diagnostics : Diagnostic [ ] = [ ] ;
28
28
29
- const options : CompilerOptions = transpileOptions . compilerOptions ? fixupCompilerOptions ( transpileOptions . compilerOptions , diagnostics ) : getDefaultCompilerOptions ( ) ;
29
+ const options : CompilerOptions = transpileOptions . compilerOptions ? fixupCompilerOptions ( transpileOptions . compilerOptions , diagnostics ) : { } ;
30
+
31
+ // mix in default options
32
+ const defaultOptions = getDefaultCompilerOptions ( ) ;
33
+ for ( const key in defaultOptions ) {
34
+ if ( hasProperty ( defaultOptions , key ) && options [ key ] === undefined ) {
35
+ options [ key ] = defaultOptions [ key ] ;
36
+ }
37
+ }
30
38
31
39
options . isolatedModules = true ;
32
40
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ namespace ts {
17
17
18
18
transpileOptions = testSettings . options || { } ;
19
19
if ( ! transpileOptions . compilerOptions ) {
20
- transpileOptions . compilerOptions = { } ;
20
+ transpileOptions . compilerOptions = { } ;
21
+ }
22
+ if ( transpileOptions . compilerOptions . target === undefined ) {
23
+ transpileOptions . compilerOptions . target = ScriptTarget . ES3 ;
21
24
}
22
25
23
26
if ( transpileOptions . compilerOptions . newLine === undefined ) {
You can’t perform that action at this time.
0 commit comments