Earlier quoted context omitted.
You can still do this with classes in typescript: class Hash extends String {} https://www.typescriptlang.org/play/?#code/MYGwhgzhAEASkAtoF...
Great example of something that does not work. Javascript classes are structural by default, Typescript does nothing there. https://www.typescriptlang.org/play/?#code/MYGwhgzhAEASkAtoF...
[0] https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAzt...