|
|
|
|
|
by mirekrusin
1362 days ago
|
|
Flow has structural typing on types and nominal on classes with correct inheritance semantics, which simply makes sense. For making Email type distinct from string, you want opaque type (first class in flow) which you can emulate as tagged type in ts. |
|
I know of TS’ opaque types, but it always feels dirty. So here I am, relying on named params instead.