I made a TS mixin transformer with full generics support, native syntax and zero runtime overhead #191
tonyboho
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introducing ts-mixin-class.
It's an AST→AST macro transformer that runs before type-checking — so it can rewrite the AST, add or remove symbols from the program, and shape the type-checking that follows.
Written with AI, of course; doing it by hand doesn't seem realistic.
Test coverage is already solid, though the transformer hasn't been battle-tested on a large real-world project yet. Give it a try — feedback very welcome.
P.S. If you're thinking of writing your own macro transformer, AGENTS.md collects a number of hard-won insights about the TS compiler's expectations and the invariants you have to preserve.
Beta Was this translation helpful? Give feedback.
All reactions