Use gulp, make a preprocessor, stream results to tsc?
Alternatively, use decorators to analyze valid javascript and inline it?
Or maybe even write a typescript AST transformer?
simplest case: elementwise arithmetic and assignment.
harder: reading/writing from buffers/arrays.
harder: cross products, matrix multiplication
harder: complex expression chains of non-elementwise operations with parens
maybe implement static single assignemnt (SSA)? Eh I dunno, maybe not necessary?
But I might still need some kind of representation of intermediate expression results that wasn't explicitly assigned to a symbol.
This could be structured as 2 libraries: a struct-inlining algorithm, and a vectormath-specific one that depends on the first one.