Comment
Comment by tigershark
You can’t have the same level of correctness as ocaml if you want to maintain the compatibility with JavaScript.
Typescript type system is unsound for this reason.
You can’t have anything approaching ocaml correctness when in typescript all objects with the same shape are interchangeable.