Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>U.Replace

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

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