How to determine generic connection types in TypeScript
we can use:
type stringNumber = string | number;
But what about:
type MapSet<T> = Map<T> | Set<T>;
Is this possible somehow?
PS this is necessary to reduce the length of the interface definitions.
UPDATE:
type MapSet<T> = Map<T> | Set<T>;
this definition is correct in typeScript 1.6, and you can use it today, as Ryan wrote below.
+3
source to share