TypeScript isn't sound, so you can't rely on the types for optimization. The shape/hidden class optimization that JS engines already have is probably about as good as you can do.
let x: number = "some string" as any;This actually happens a lot with types from DefinitelyTyped that are not maintained by the original author of the library.