Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: improve support of ExportNamespaceSpecifiers #1185

Conversation

coderaiser
Copy link
Contributor

@coderaiser coderaiser commented Sep 8, 2022

 const code = 'export * as fs2 from "fs/promises"';
 const ast = recast.parse(code, parseOptions);

 traverse(ast, {
    ExportNamedDeclaration(path: NodePath) {
        path.replaceWith(template.ast('export * as fs from "xx"') as Node);
        path.stop();
    }
})

recast.print(ast).code;
// returns not valid
export {* as fs} from "xx"

Landed in @putout/recast v1.8.0

@coderaiser coderaiser force-pushed the feature/improve-support-of-export-namespace-specifiers branch from 5d66e84 to 4ee87ac Compare September 8, 2022 14:35
@coderaiser
Copy link
Contributor Author

Merged in #1391

@coderaiser coderaiser closed this Apr 5, 2024
@coderaiser coderaiser deleted the feature/improve-support-of-export-namespace-specifiers branch April 5, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant