Skip to main content

Arrayable

A type that allows both the given type and an array of that type.


Interface

typescript
type Arrayable<T> = T | T[];

Usage

typescript
import { Arrayable } from '@modern-kit/types';

type Result = Arrayable<string>; // string | string[]