@babel/helper-module-imports
- Version 8.0.0
- Published
- 66.2 kB
- 2 dependencies
- MIT license
Install
npm i @babel/helper-module-importsyarn add @babel/helper-module-importspnpm add @babel/helper-module-importsOverview
Babel helper functions for inserting module loads
Index
Functions
function addDefault
addDefault: ( path: NodePath, importedSource: string, opts?: Partial<ImportOptions>) => t.Identifier | t.MemberExpression | t.SequenceExpression;function addNamed
addNamed: { ( path: NodePath, name: string, importedSource: string, opts?: Omit< Partial<ImportOptions>, 'ensureLiveReference' | 'ensureNoContext' > ): t.Identifier; ( path: NodePath, name: string, importedSource: string, opts?: Omit<Partial<ImportOptions>, 'ensureLiveReference'> & { ensureLiveReference: true; } ): t.MemberExpression; ( path: NodePath, name: string, importedSource: string, opts?: Omit<Partial<ImportOptions>, 'ensureNoContext'> & { ensureNoContext: true; } ): t.SequenceExpression;};function addNamespace
addNamespace: ( path: NodePath, importedSource: string, opts?: Partial<ImportOptions>) => t.Identifier | t.MemberExpression | t.SequenceExpression;function addSideEffect
addSideEffect: ( path: NodePath, importedSource: string, opts?: Partial<ImportOptions>) => t.Identifier | t.MemberExpression | t.SequenceExpression;function isModule
isModule: (path: NodePath<t.Program>) => boolean;A small utility to check if a file qualifies as a module.
Classes
class ImportInjector
class ImportInjector {}A general helper classes add imports via transforms. See README for usage.
constructor
constructor( path: NodePath, importedSource?: string, opts?: Partial<ImportOptions>);method addDefault
addDefault: ( importedSourceIn: string, opts: Partial<ImportOptions> | undefined) => t.Identifier | t.MemberExpression | t.SequenceExpression;method addNamed
addNamed: ( importName: string, importedSourceIn: string, opts: Partial<ImportOptions> | undefined) => t.Identifier | t.MemberExpression | t.SequenceExpression;method addNamespace
addNamespace: ( importedSourceIn: string, opts: Partial<ImportOptions> | undefined) => t.Identifier | t.MemberExpression | t.SequenceExpression;method addSideEffect
addSideEffect: ( importedSourceIn: string, opts: Partial<ImportOptions> | undefined) => t.Identifier | t.MemberExpression | t.SequenceExpression;Package Files (1)
Dependencies (2)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@babel/helper-module-imports.
- Markdown[](https://www.jsdocs.io/package/@babel/helper-module-imports)
- HTML<a href="https://www.jsdocs.io/package/@babel/helper-module-imports"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2803 ms. - Missing or incorrect documentation? Open an issue for this package.
