It sounds like your issue here is that TypeScript is a superset of JavaScript and comes with JavaScript's complications/inefficiencies. Do you agree with that assessment?
Yes. As the parent comment said, you could try to to choose a subset of TypeScript that's relatively efficient to help avoid some of the issues with JavaScript. The problem is that the TypeScript language itself lacks certain primitives required for efficient ahead-of-time compiled code (integers, for example).