Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>Union.Replace

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

Replace M with A in U

Examples

Example 1

Type Parameters

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