-
Hi, is there a way to constrain a value to be a list of at least 1 integer? It seems builtins are evaluated even for incomplete types? The following exemple gives me import "list"
#foo: [...int] & list.MinItems(1) // This is not valid
bar: #foo & [1, 2, 3] Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
ndrpnt
Aug 28, 2021
Replies: 1 comment
-
Oh well, this seems to work: #foo: [int, ...int]
bar: #foo & [1, 2, 3] Easy! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ndrpnt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh well, this seems to work:
Easy!