3 ms·
Can you do any compile time metaprogramming in typescript?
by mhh__ 2y ago
Can you do any compile time metaprogramming in typescript?
- mhio 2y agoNot really - https://github.com/Microsoft/TypeScript/issues/16607 https://github.com/Microsoft/TypeScript/issues/16607. ts-morph provides an easy way to use the TypeScript Compiler API to view and edit the AST before compile. Once you get your head around the API, which has good examples but isn't thoroughly documented on the web. https://github.com/dsherret/ts-morph https://github.com/dsherret/ts-morph
- phplovesong 2y agoNope. For thins you pick Haxe (https://haxe.org/ https://haxe.org/), it has an awesome macro system, and a state of the art compiler thats really, really fast.
- mhio 2y agoHow does haxe modify a typescript project pre or post compile?