Stronger JavaScript with Opaque Types
In Flow and TypeScript, types are transparent by default - if two types are structurally identical they are deemed to be compatible. For example, the following types are compatible: Username and Password are both strings, so they are equivalent as far as Flow and TypeScript are concerned, even though they represent entirely different concepts.
https://codemix.com/opaque-types-in-javascript/