-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type.ListOf #32
Comments
Great idea. union-type allows one to use any validator function. So it should be possible to just define var ListOf = type => list => R.all(R.is(type), list)
const Shape = Type({Shape: [ListOf(Point)]}) |
Unfortunately this still doesn't work: |
Is |
I'd be very interested in this type too ! 👍 |
simple ListOf[T] Type as mention in paldepind#32 validate it is a Array and each element type to be T
simple ListOf[T] Type as mention in paldepind#32 validate it is a Array and each element type to be T
simple ListOf[T] Type as mention in paldepind#32 validate it is a Array and each element type to be T
It would be useful to be able to define that a property of a type should be a typed list, eg:
Implementation could be something like (assuming the prototype version in the
next
branch)The text was updated successfully, but these errors were encountered: