Returns an array of the union types if the provided type is a union. Otherwise, returns an array containing the provided type as its unique element.
A TypeScript type.
An array of types. It's never empty.
Returns an array of the union types if the provided type is a union. Otherwise, returns an array containing the provided type as its unique element.