Typescript syntax for the creation of an empty array literal #3891
Unanswered
andrewpatto
asked this question in
Q&A
Replies: 1 comment
-
We should close this - I'll start a discussion in the edgedb-js repo (where I should have made this) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't quite work out the syntax for Typescript for creating empty arrays (as it turns out an array of tuples - though not sure this is important - I can't create empty arrays of strings either!)
The e.array() constructor requires an argument, but won't take an empty array as that argument. I totally get that I might have to also provide a type as no type info can be inferred from empty data - but can't work out the syntax.
I see an example of how to construct empty sets in the typescript client using cast..
but what I think is the equivalent does not seem to work for arrays.
Any ideas? Thanks..
Beta Was this translation helpful? Give feedback.
All reactions