Someone would have to implement Typescript into the javax.script APIs.