Home > vue-metamorph > astHelpers > createNamespaceImport
astHelpers.createNamespaceImport() function
Inserts a namespaced import at the top of a script
Signature:
typescript
export declare function createNamespaceImport(ast: namedTypes.Program, moduleSpecifier: string, namespaceName: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
ast | namedTypes.Program | The script AST |
moduleSpecifier | string | The module name to import from |
namespaceName | string | The name of the namespace in the module |
void