You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feature request: Run transformers if --noEmit #178
Seems typescript itself runs the custom transforms as part of the emit which prevents transformers being used called at all. I'd like to execute my transformers even with --noEmit to do some validations:
Hence it would be great if ts-patch could ensure that the transformers are still called. The easiest solution could be to pass use a custom CompilerHost forwarding all calls to the original one. Then in the writeFile check for options.noEmit.
The alternative to call the transformers within ts-patch seems like an overkill as the logic is quite complex inside typescript.
Oooh, yes this would be great! I was planning to run the compiler with a custom transformer and --noEmit in order to embed my code into a vector database for querying via an AI. I'm hoping that by using the AST to embed the code will allow for syntactic awareness that will make the AI's responses much more accurate.
Activity
Griffork commentedon Jun 24, 2025
Oooh, yes this would be great! I was planning to run the compiler with a custom transformer and --noEmit in order to embed my code into a vector database for querying via an AI. I'm hoping that by using the AST to embed the code will allow for syntactic awareness that will make the AI's responses much more accurate.