3 ms·
> Or you could if you manually added some common tag to every single data type like interface. This is how you emulate them, I took it for granted and neglecte
by mixedCase 7y ago
> Or you could if you manually added some common tag to every single data type like interface.
This is how you emulate them, I took it for granted and neglected to explicitly mention this is a moderately popular convention in TypeScript (those are the tags I referred to). fp-ts for example uses it all over the place.
With this the end result is essentially the same with compile-time type-safety for everything, and compiled down to an untyped binary or an untyped JS blob.