MCPcopy Create free account
hub / github.com/babel/babel / isPotentialImportPhase

Function isPotentialImportPhase

packages/babel-parser/src/parser/statement.ts:2942–2951  ·  view source on GitHub ↗
(isExport: boolean)

Source from the content-addressed store, hash-verified

2940 }
2941
2942 isPotentialImportPhase(isExport: boolean): boolean {
2943 if (isExport) {
2944 if (!this.isContextual(tt._defer)) return false;
2945 // export defer { x } from '...'
2946 // export defer * as ns from '...'
2947 const ch = this.lookaheadCharCode();
2948 return ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk;
2949 }
2950 return this.isContextual(tt._source) || this.isContextual(tt._defer);
2951 }
2952
2953 applyImportPhase(
2954 node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected