Create an opaque type, which hides its internal details from the public, and can only be created by being used explicitly.
3
4
The generic type parameter can be anything. It doesn't have to be an object.
5
6
[Read more about opaque types.](https://codemix.com/opaque-types-in-javascript/)
7
8
There have been several discussions about adding this feature to TypeScript via the `opaque type` operator, similar to how Flow does it. Unfortunately, nothing has (yet) moved forward: