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

Function assertModuleNodeAllowed

packages/babel-parser/src/parser/statement.ts:613–620  ·  view source on GitHub ↗
(node: N.Node)

Source from the content-addressed store, hash-verified

611 }
612
613 assertModuleNodeAllowed(node: N.Node): void {
614 if (
615 !(this.optionFlags & OptionFlags.AllowImportExportEverywhere) &&
616 !this.inModule
617 ) {
618 this.raise(Errors.ImportOutsideModule, node);
619 }
620 }
621
622 // Attach the decorators to the given class.
623 // NOTE: This method changes the .start location of the class, and thus

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected