I think we need something quite a bit more radical than Typescript.
We have "use strict" and I think we need to add "use types" too.
In that mode, we need to disallow the more dynamic parts of JS. They add TONS of typing headaches resulting in poorly-typed projects and they hurt performance too.
This could allow for a much more simple type system and allow a path forward where things like type coercion aren't a thing.
I think we need something quite a bit more radical than Typescript.
We have "use strict" and I think we need to add "use types" too.
In that mode, we need to disallow the more dynamic parts of JS. They add TONS of typing headaches resulting in poorly-typed projects and they hurt performance too.
This could allow for a much more simple type system and allow a path forward where things like type coercion aren't a thing.