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 @@ -1792,11 +1792,6 @@ namespace ts {
1792
1792
sourceFile . moduleName = moduleName ;
1793
1793
}
1794
1794
1795
- // Store syntactic diagnostics
1796
- if ( diagnostics && sourceFile . parseDiagnostics ) {
1797
- diagnostics . push ( ...sourceFile . parseDiagnostics ) ;
1798
- }
1799
-
1800
1795
let newLine = getNewLineCharacter ( options ) ;
1801
1796
1802
1797
// Output
@@ -1818,9 +1813,8 @@ namespace ts {
1818
1813
1819
1814
var program = createProgram ( [ inputFileName ] , options , compilerHost ) ;
1820
1815
1821
- if ( diagnostics ) {
1822
- diagnostics . push ( ...program . getOptionsDiagnostics ( ) ) ;
1823
- }
1816
+ addRange ( /*to*/ diagnostics , /*from*/ sourceFile . parseDiagnostics ) ;
1817
+ addRange ( /*to*/ diagnostics , /*from*/ program . getOptionsDiagnostics ( ) ) ;
1824
1818
1825
1819
// Emit
1826
1820
program . emit ( ) ;
@@ -4191,7 +4185,7 @@ namespace ts {
4191
4185
var result : DefinitionInfo [ ] = [ ] ;
4192
4186
forEach ( ( < UnionType > type ) . types , t => {
4193
4187
if ( t . symbol ) {
4194
- result . push ( ... getDefinitionFromSymbol ( t . symbol , node ) ) ;
4188
+ addRange ( /*to*/ result , /*from*/ getDefinitionFromSymbol ( t . symbol , node ) ) ;
4195
4189
}
4196
4190
} ) ;
4197
4191
return result ;
You can’t perform that action at this time.
0 commit comments