The tuple type currently throws a somewhat confusing error message when the input has to few values, while it passes for inputs with more values than expected.
error: array index out of bounds (index: 1, len: 1) and no default value was specified
┌─ @preview/valkyrie:0.2.0/src/types/tuple.typ:25:10
│
25 │ it.at(key),
It would be nice to get a more helpful error message like with the other types.
In addition, I would expect the validation to fail, if the supplied value has more values as expected. In the example, the first call to parse should have failed.
The tuple type currently throws a somewhat confusing error message when the input has to few values, while it passes for inputs with more values than expected.
See this example:
The first call to
parse
throws this error:It would be nice to get a more helpful error message like with the other types.
In addition, I would expect the validation to fail, if the supplied value has more values as expected. In the example, the first call to
parse
should have failed.