(newFileNeedExport, newFileNameWithExtension, useEs6Imports, quotePreference)
| 162239 | } |
| 162240 | } |
| 162241 | function createOldFileImportsFromNewFile(newFileNeedExport, newFileNameWithExtension, useEs6Imports, quotePreference) { |
| 162242 | var defaultImport; |
| 162243 | var imports = []; |
| 162244 | newFileNeedExport.forEach(function (symbol) { |
| 162245 | if (symbol.escapedName === "default" /* InternalSymbolName.Default */) { |
| 162246 | defaultImport = ts.factory.createIdentifier(ts.symbolNameNoDefault(symbol)); // TODO: GH#18217 |
| 162247 | } |
| 162248 | else { |
| 162249 | imports.push(symbol.name); |
| 162250 | } |
| 162251 | }); |
| 162252 | return makeImportOrRequire(defaultImport, imports, newFileNameWithExtension, useEs6Imports, quotePreference); |
| 162253 | } |
| 162254 | function makeImportOrRequire(defaultImport, imports, path, useEs6Imports, quotePreference) { |
| 162255 | path = ts.ensurePathIsNonModuleName(path); |
| 162256 | if (useEs6Imports) { |
no test coverage detected