Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>Union.Last

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

Get the last item within an [[Union]] (⚠️ it might not preserve order)

Examples

Example 1

Type Parameters

U extends any
definition: IntersectOf<U extends unknown ? (x: U) => void : never> extends (x: infer P) => void ? P : never