Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you do any compile time metaprogramming in typescript?


Not really - 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


Nope. For thins you pick Haxe (https://haxe.org/), it has an awesome macro system, and a state of the art compiler thats really, really fast.


How does haxe modify a typescript project pre or post compile?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: