Skip to content

How to validate that something is an array, not caring about the items in the array(performance) #829

Answered by itsramiel
itsramiel asked this question in Q&A
Discussion options

You must be logged in to vote

Like this maybe:

v.custom<Array<unknown>>((x) => Array.isArray(x))

or is there a better way?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fabian-hiller
Comment options

@itsramiel
Comment options

@fabian-hiller
Comment options

Answer selected by itsramiel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants