-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
[request] getCustomTransformer(program: ts.Program) just like as ts-loader's #792
Comments
@gfx You're welcome to submit a PR since I'm not 100% sure what you require here. I assume it won't work for |
Thanks.
BTW I've found https://github.com/cevek/ttypescript , a custom typescript compiler to provide I think the best way is that the official typescript compiler supports such transformers, and I have no idea what is the better 🤔 |
I have a similar problem, I have a transformer that will generate runtime json validation based on generic type argument so I need an access to typeChecker in there. |
@gfx nice find with |
In order to use a transformer that uses ts.Program / ts.TypeChecker, for example https://github.com/kimamula/ts-transformer-keys
See https://github.com/TypeStrong/ts-loader#getcustomtransformers--program-program---before-transformerfactory-after-transformerfactory-- for details.
It might be somewhat difficult because TypeScript compiler restricts the use of TypeChecker in transformers: microsoft/TypeScript#25147 , though.
The text was updated successfully, but these errors were encountered: