Skip to main content

Promiseable

A type that allows both the given type and its Promise type.


Interface

typescript
type Promiseable<T> = T | Promise<T>;

Usage

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

type Result = Promiseable<string>; // string | Promise<string>