TypeScript Utility Types

Omit<T, K> — exclude named properties

Omit constructs a contract from the keys of T other than K. Unlike Pick, its key argument may name keys absent from T; such names have no effect. It does not delete data. For a union of object types, ordinary Omit works through keyof T and may discard member-specific properties; a deliberately distributive wrapper is needed when preserving each member is the goal. Example output: "Basic true". Verified with strict TypeScript 5.8.3, ES2022 and Node.js 22.16.0. This utility affects static typing; no runtime validation or transformation is supplied by the type itself.

Formal Syntax & Structure

typescript syntaxtypescript
Omit<T, K>

Parameters & Attributes

NameTypeDescription
Ttype parameterSource type.
KK extends keyof anyProperty keys to omit; absent keys are permitted.

Working Example

Example Snippettypescript
type Account = { id: number; label: string; internal: boolean };const account: Account = { id: 1, label: "Basic", internal: true };const publicView: Omit<Account, "internal"> = account;console.log(publicView.label, Object.keys(publicView).includes("internal"));
TypeScript Reference