File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ export function toClosureJS(
159
159
{ jsFiles : Map < string , string> , externs : string } | null {
160
160
const closureJSOptions : ClosureJSOptions = {
161
161
...getDefaultClosureJSOptions ( fileNames , settings ) ,
162
- ...partialClosureJSOptions
162
+ // Work around https://github.com/Microsoft/TypeScript/issues/16509.
163
+ ...( partialClosureJSOptions as ClosureJSOptions ) ,
163
164
} ;
164
165
// Parse and load the program without tsickle processing.
165
166
// This is so:
Original file line number Diff line number Diff line change @@ -345,7 +345,11 @@ const DEFAULT_COMPILER_OPTIONS = {
345
345
346
346
function compile ( sources : Map < string , string > , partialOptions = { } as Partial < CompilerOptions > ) :
347
347
{ compiledJS : string , dts : string | undefined , sourceMap : SourceMapConsumer } {
348
- const options : CompilerOptions = { ...DEFAULT_COMPILER_OPTIONS , ...partialOptions } ;
348
+ const options : CompilerOptions = {
349
+ ...DEFAULT_COMPILER_OPTIONS ,
350
+ // Work around https://github.com/Microsoft/TypeScript/issues/16509
351
+ ...( partialOptions as CompilerOptions ) ,
352
+ } ;
349
353
const resolvedSources = new Map < string , string > ( ) ;
350
354
for ( const fileName of toArray ( sources . keys ( ) ) ) {
351
355
resolvedSources . set ( ts . sys . resolvePath ( fileName ) , sources . get ( fileName ) ! ) ;
You can’t perform that action at this time.
0 commit comments