(name, path)
| 347 | } |
| 348 | } else { |
| 349 | function findImportPath(name, path) { |
| 350 | return root |
| 351 | .find(j.ImportDeclaration, { source: { value: path } }) |
| 352 | .filter(p => p.value.specifiers.find(sp => sp.type === 'ImportDefaultSpecifier' && sp.local.name === name)); |
| 353 | } |
| 354 | |
| 355 | function emitImport(name, path, knownProperties, uses) { |
| 356 | const usedProperties = coreImportDeclaration.value.specifiers.filter( |