File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1792,11 +1792,6 @@ namespace ts {
17921792 sourceFile . moduleName = moduleName ;
17931793 }
17941794
1795- // Store syntactic diagnostics
1796- if ( diagnostics && sourceFile . parseDiagnostics ) {
1797- diagnostics . push ( ...sourceFile . parseDiagnostics ) ;
1798- }
1799-
18001795 let newLine = getNewLineCharacter ( options ) ;
18011796
18021797 // Output
@@ -1818,9 +1813,8 @@ namespace ts {
18181813
18191814 var program = createProgram ( [ inputFileName ] , options , compilerHost ) ;
18201815
1821- if ( diagnostics ) {
1822- diagnostics . push ( ...program . getOptionsDiagnostics ( ) ) ;
1823- }
1816+ addRange ( /*to*/ diagnostics , /*from*/ sourceFile . parseDiagnostics ) ;
1817+ addRange ( /*to*/ diagnostics , /*from*/ program . getOptionsDiagnostics ( ) ) ;
18241818
18251819 // Emit
18261820 program . emit ( ) ;
@@ -4191,7 +4185,7 @@ namespace ts {
41914185 var result : DefinitionInfo [ ] = [ ] ;
41924186 forEach ( ( < UnionType > type ) . types , t => {
41934187 if ( t . symbol ) {
4194- result . push ( ... getDefinitionFromSymbol ( t . symbol , node ) ) ;
4188+ addRange ( /*to*/ result , /*from*/ getDefinitionFromSymbol ( t . symbol , node ) ) ;
41954189 }
41964190 } ) ;
41974191 return result ;
You can’t perform that action at this time.
0 commit comments