comptime.ts — compile-time expressions for TypeScript
A dead-simple TypeScript compiler that does one thing really well: enables compile-time evaluation of expressions marked with comptime.
This is useful for optimising your code by moving computations from runtime to compile time. This project was inspired by Bun macros and Zig comptime (hence the name).
Warning: You are responsible for ensuring that the expressions you mark with comptime are safe to evaluate at compile time. comptime.ts does not perform any isolation. However, comptime imports ar...
Read more at comptime.js.org