File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1789,11 +1789,6 @@ namespace ts {
17891789 sourceFile . moduleName = moduleName ;
17901790 }
17911791
1792- // Store syntactic diagnostics
1793- if ( diagnostics && sourceFile . parseDiagnostics ) {
1794- diagnostics . push ( ...sourceFile . parseDiagnostics ) ;
1795- }
1796-
17971792 let newLine = getNewLineCharacter ( options ) ;
17981793
17991794 // Output
@@ -1815,9 +1810,8 @@ namespace ts {
18151810
18161811 var program = createProgram ( [ inputFileName ] , options , compilerHost ) ;
18171812
1818- if ( diagnostics ) {
1819- diagnostics . push ( ...program . getCompilerOptionsDiagnostics ( ) ) ;
1820- }
1813+ addRange ( /*to*/ diagnostics , /*from*/ sourceFile . parseDiagnostics ) ;
1814+ addRange ( /*to*/ diagnostics , /*from*/ program . getCompilerOptionsDiagnostics ( ) ) ;
18211815
18221816 // Emit
18231817 program . emit ( ) ;
@@ -4188,7 +4182,7 @@ namespace ts {
41884182 var result : DefinitionInfo [ ] = [ ] ;
41894183 forEach ( ( < UnionType > type ) . types , t => {
41904184 if ( t . symbol ) {
4191- result . push ( ... getDefinitionFromSymbol ( t . symbol , node ) ) ;
4185+ addRange ( /*to*/ result , /*from*/ getDefinitionFromSymbol ( t . symbol , node ) ) ;
41924186 }
41934187 } ) ;
41944188 return result ;
You can’t perform that action at this time.
0 commit comments