Minimal array length - how to?
This page https://arktype.io/docs/objects#arrays says one can use
[] > 1
to constrain minimal array length. However, this doesn't work:
ERROR:
3 Replies
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
There should be a
.atLeastLength
(or similar) that you can use
type(obj, '[]').atLeastLength(2)
Thanks @TizzySaurus !