Deviopath › TypeScript

Wrap in an Array

Easy · Generics

Write toArray<T>(value: T | T[]): T[].

If value is already an array, return it. Otherwise return a new array that contains just value.

Next: Update with Partial