( source: string, declaration: ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration )
| 1263 | } |
| 1264 | |
| 1265 | private addSource( |
| 1266 | source: string, |
| 1267 | declaration: ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration |
| 1268 | ) { |
| 1269 | const parsedAttributes = getAttributesFromImportExportDeclaration(declaration.attributes); |
| 1270 | const existingAttributes = this.sourcesWithAttributes.get(source); |
| 1271 | if (existingAttributes) { |
| 1272 | if (doAttributesDiffer(existingAttributes, parsedAttributes)) { |
| 1273 | this.log( |
| 1274 | LOGLEVEL_WARN, |
| 1275 | logInconsistentImportAttributes(existingAttributes, parsedAttributes, source, this.id), |
| 1276 | declaration.start |
| 1277 | ); |
| 1278 | } |
| 1279 | } else { |
| 1280 | this.sourcesWithAttributes.set(source, parsedAttributes); |
| 1281 | } |
| 1282 | if ((declaration as ImportDeclaration).phase === 'source') { |
| 1283 | this.sourcePhaseSources.add(source); |
| 1284 | } |
| 1285 | } |
| 1286 | |
| 1287 | private getImportedJsxFactoryVariable( |
| 1288 | baseName: string, |
no test coverage detected