Description
Hi all!
I've been thinking about this for awhile, and I thought I'd go ahead and gauge interest.
ttypescript
and to a lesser extent, ts-patch
, have been filling a void for awhile now. I know that they have been very helpful for many of us who needed to do more with the TS compiler. With that said, in hindsight—gauging from personal use and feature requests—I believe that there is room for improvement in our overall design which could make for a much more powerful and perhaps more complete plugin architecture.
Update
Given the issues with ttypescript and its unmaintained status and the current limitation with ts-patch
, I think it's time to do the rewrite.
I've sketched out the design. Here are the highlights:
- Will not directly modify ts files (better for yarn)
- Will allow persistent alias overwriting (ie. can name the compiler
tsc
or something else, default istspc
) - Supports custom patches which allow actual AST transformation of typescript libraries themselves, opening the door for packaged middleware
- Uses smart caching for core patch and custom patches applied to typescript modules (improves speed)
- Single plugin package can contain multiple before, after, afterDeclarations transformers + patches
- Will maintain support for current
ttypescript
style transformer packages
I've decided to keep the name for simplicity and visibility. So the rewrite will be housed in ts-patch v2.
You can follow nonara/ts-patch#40 for updates