You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to create a custom parser for this but I'm not sure how to, as it need to return a type for each node where in this case I would want to return a single type for the entire array and not a type per spread operation.
Note: An alternative would be to create a type like so
Hi @arthurfiorette, I'd love to but as I explained in the comment I tried to create a custom parser for this but I'm not sure how to tackle this one as it seems we get multiple nodes, one for each spread array instead of one node for the final array, if you have any idea how to tackle this one I'd be happy to finish it up including tests and open a PR
Hi, when create an Array literal type the parser works fine as the resulting node is
ArrayLiteralExpression
That is, when creating something like so:
but when combining two or more literalArrays into a new literal array the subNodeParser is finding a a
SpreadElement
for each array first.I tried to create a custom parser for this but I'm not sure how to, as it need to return a type for each node where in this case I would want to return a single type for the entire array and not a type per spread operation.
Note: An alternative would be to create a type like so
Which would work but will result in a anyOf instead of an enum which I need for my usecase.
The text was updated successfully, but these errors were encountered: