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

How to use with @babel/preset-typescript #37

Closed
hpohlmeyer opened this issue Nov 26, 2018 · 4 comments
Closed

How to use with @babel/preset-typescript #37

hpohlmeyer opened this issue Nov 26, 2018 · 4 comments
Labels

Comments

@hpohlmeyer
Copy link

I am not sure if this is the same issue as #36, but it would be really nice to have a way to use this with @babel/preset-typescript. Since there is no transformer option, is there a more low-level way we could do this?

@dsherret
Copy link
Owner

Hey @hpohlmeyer, I don't think it's possible yet because I don't believe that has a way to inject custom transformers at the moment :(

@hpohlmeyer
Copy link
Author

Thanks, I guess I will open an issue with the babel preset.
The Typescript Team does not seem to have any plans to include it in the compiler. :/

@dsherret
Copy link
Owner

dsherret commented Dec 2, 2018

I just looked into this a bit more and it looks like @babel/preset-typescript is not using the typescript compiler: https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-typescript/src/index.js (which makes sense, now that I think about it...)

Since it's not using the typescript AST, it wouldn't be possible for ts-nameof to work with it. I did find this babel plugin though, but I'm not sure if will help in this case (I'm not too familiar with babel): https://github.com/enoshixi/babel-plugin-nameof

@dsherret
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants