Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>U.ListOf

👷 TypeScript's largest type utility library, now on Deno
Latest
type alias U.ListOf
import { type U } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { ListOf } = U;

Transform a [[Union]] into a [[List]] (⚠️ it might not preserve order)

Examples

Example 1

Type Parameters

U extends any
definition: _ListOf<U> extends infer X ? Cast<X, List> : never