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

Example way of creating TS AST Node is outdated #6

Open
leumasme opened this issue Nov 4, 2021 · 2 comments
Open

Example way of creating TS AST Node is outdated #6

leumasme opened this issue Nov 4, 2021 · 2 comments

Comments

@leumasme
Copy link

leumasme commented Nov 4, 2021

All your examples use

import ts = require('typescript')
// ...
ts.createExportAssignment(/* ... */):

(e.g example Import Macro)
This generates warnings

'createExportAssignment' is deprecated.
@deprecated — Use factory.createExportAssignment or the factory supplied by your transformation context instead.
@blainehansen
Copy link
Owner

Pull requests are welcome :) Honestly macro-ts isn't a big priority for me anymore ha, I realized it wasn't a very good idea to try to hack something so important and foundational as macros into a project that was never designed for them. There's a bigger project I've been pursuing.

@leumasme
Copy link
Author

Aw thats sad, felt like rust style macros were a nice idea for typescript and the execution seemed great from the docs (aside from no editor service~).
But oh well, maybe typescript will add them natively one day.

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

No branches or pull requests

2 participants