(
specifier: Undone<N.ImportSpecifier>,
/* eslint-disable @typescript-eslint/no-unused-vars -- used in TypeScript and Flow parser */
importedIsString: boolean,
isInTypeOnlyImport: boolean,
isMaybeTypeOnly: boolean,
/* eslint-enable @typescript-eslint/no-unused-vars */
)
| 3347 | // https://tc39.es/ecma262/#prod-ImportSpecifier |
| 3348 | // The specifier is validated later by checkImportSpecifier. |
| 3349 | parseImportSpecifier( |
| 3350 | specifier: Undone<N.ImportSpecifier>, |
| 3351 | /* eslint-disable @typescript-eslint/no-unused-vars -- used in TypeScript and Flow parser */ |
| 3352 | importedIsString: boolean, |
| 3353 | isInTypeOnlyImport: boolean, |
| 3354 | isMaybeTypeOnly: boolean, |
| 3355 | /* eslint-enable @typescript-eslint/no-unused-vars */ |
| 3356 | ): N.ImportSpecifier { |
| 3357 | if (this.eatContextual(tt._as)) { |
| 3358 | specifier.local = this.parseIdentifier(); |
| 3359 | } else { |
| 3360 | specifier.local ??= this.cloneIdentifier( |
| 3361 | specifier.imported as N.Identifier, |
| 3362 | ); |
| 3363 | } |
| 3364 | return this.finishNode(specifier, "ImportSpecifier"); |
| 3365 | } |
| 3366 | |
| 3367 | checkImportSpecifier( |
| 3368 | specifier: N.ImportSpecifier, |
nothing calls this directly
no test coverage detected