Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>U.Select

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

Extract the part of U that matches M

Examples

Example 1

Type Parameters

U extends any
M extends any
optional
match extends Match = "default"
definition: U extends unknown ? { 1: U & M; 0: never; }[Is<U, M, match>] : never