Open ForbesLindesay opened 4 years ago
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#variadic-tuple-types means it should now be possible to build a type safe concat method that supports mixing Tuple types and Array types. This primitive would also allow proper typed support for things like "non-empty Array" via:
concat
Tuple(Value).concat(Array(Value)) // => Runtype<[Value, ...Value[]]>
Requested in: https://github.com/pelotom/runtypes/issues/147
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#variadic-tuple-types means it should now be possible to build a type safe
concat
method that supports mixing Tuple types and Array types. This primitive would also allow proper typed support for things like "non-empty Array" via:Requested in: https://github.com/pelotom/runtypes/issues/147