That's pretty neat. What I really want is this:
function fn(query:string){
const stuff = // do some stuff with `query` variable
return createType(stuff);
}
type MyType = FromJS<fn("SELECT id, name AS nom FROM things WHERE active = true")>;
This way we could compute types on the fly with JavaScript instead of creating monstrous types in TypeScript types system.