type alias U.Replaceimport { type U } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts"; const { Replace } = U; Replace M with A in U ExamplesExample 1 Type ParametersU extends anyM extends anyA extends anyoptionalmatch extends Match = "default"definition: U extends unknown ? { 1: A; 0: U; }[Is<U, M, match>] : never