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:
https://github.com/microsoft/TypeScript/blob/c85e626d8e17427a6865521737b45ccbbe9c78ef/src/compiler/program.ts#L2765-L2772
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.
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
--noEmitto do some validations:https://github.com/microsoft/TypeScript/blob/c85e626d8e17427a6865521737b45ccbbe9c78ef/src/compiler/program.ts#L2765-L2772
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
CompilerHostforwarding all calls to the original one. Then in thewriteFilecheck foroptions.noEmit.The alternative to call the transformers within ts-patch seems like an overkill as the logic is quite complex inside typescript.