TypeScript Omit Utility Type — Handbook Reference 2026
Omit<Type, Keys> constructs a new type by removing specified Keys from Type. Implemented as Pick<T, Exclude<keyof T, K>>. Added in TS 3.5 (June 2019), now one of the most-used utility types.
Updated April 2026 · TypeScript 5.6+ · Based on TypeScript Handbook + production patterns
Quick reference: 5 most-common Omit patterns
1. Strip server-controlled fields from creation payload
type CreateUserRequest = Omit<User, "id" | "createdAt" | "updatedAt">2. Public-safe type (remove sensitive fields)
type PublicUser = Omit<User, "password" | "email" | "phoneHash">3. React component props extending DOM with overrides
type ButtonProps = Omit<
React.ButtonHTMLAttributes<HTMLButtonElement>,
"type"
> & { type: "primary" | "secondary" }4. Distributive Omit for polymorphic union types
type DistributiveOmit<T, K extends keyof any> =
T extends any ? Omit<T, K> : never5. Update payload (Partial of Omit)
type UpdateUserRequest = Partial<Omit<User, "id" | "createdAt">> & { id: string }Frequently asked questions
What is the TypeScript Omit utility type?▼
Omit<Type, Keys> is a built-in TypeScript utility type that constructs a new type by taking all properties from Type and removing the specified Keys. It was added to the TypeScript standard library in TypeScript 3.5 (June 2019) and has become one of the most-used utility types alongside Pick, Partial, Required, and Readonly. Internally Omit is implemented as: type Omit<T, K extends string | number | symbol> = Pick<T, Exclude<keyof T, K>>. This means Omit is essentially Pick + Exclude composed.
What is the syntax of Omit?▼
Omit takes two type parameters: Omit<Type, Keys>. Type is the source type, Keys is a string literal type or union of string literals representing properties to remove. Single key: Omit<User, "password">. Multiple keys: Omit<User, "password" | "email">. With keyof: Omit<User, keyof PrivateFields>. The result is a new type with the original Type minus the specified Keys. Properties not present in Type that are listed in Keys are silently ignored. The result is a fully resolved type — TypeScript expands Omit at compile time.
When should I use Omit vs Pick?▼
Use Pick<Type, Keys> when you want a SUBSET — listing the few properties you want from a larger type. Use Omit<Type, Keys> when you want the COMPLEMENT — listing the few properties you want to exclude. Decision rule: pick the one that produces the shorter, more readable type. If your source type has 10 properties and you need 8, use Omit (2 to exclude). If you need 2, use Pick (2 to include). Both produce equivalent results for the same property selection — choose by readability. Common pattern: API request types use Omit to strip server-controlled fields (id, createdAt, updatedAt) from creation payloads.
What are common Omit patterns in real codebases?▼
Top 5 production Omit patterns 2026: (1) API payload from entity: type CreateUserRequest = Omit<User, "id" | "createdAt" | "updatedAt">. (2) Public-facing type from full record: type PublicUser = Omit<User, "password" | "email" | "phoneHash">. (3) React component props extending DOM: type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> & { type: "primary" | "secondary" }. (4) Form schema from entity: type LoginFormData = Omit<User, keyof ServerOnlyFields>. (5) Discriminated union narrowing: type ResolvedTask = Omit<Task, "status"> & { status: "completed" }. Patterns 1 and 3 are the highest-frequency — most TypeScript codebases use them dozens of times.
How does Omit handle distributive vs non-distributive behavior?▼
Omit is NON-DISTRIBUTIVE by default — when applied to a union type, it operates on the union as a whole rather than distributing over members. Example: type Animal = { name: string; legs: number } | { name: string; wings: number }; type NamedAnimal = Omit<Animal, "name">; produces NamedAnimal = { legs: number } | { wings: number } — but only because both union members had a "name" property. To make Omit distributive, wrap it: type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never; This is a common pattern in libraries handling polymorphic component props (Material UI, Chakra, etc.). TypeScript 4.5+ has built-in distributive helpers.
What are common Omit pitfalls to avoid?▼
Top Omit gotchas 2026: (1) String literal mismatch — Omit<User, "passWord"> silently does nothing if property is "password" (case mismatch). TypeScript 4.5+ catches this with "keyof T" constraint, but older code often missed. (2) Generic type erasure — Omit<T, K> where T is generic loses some narrow inference. (3) Order matters with intersection: Omit<A & B, "id"> behaves differently than (Omit<A, "id">) & (Omit<B, "id">). (4) Distributive vs non-distributive (see above) — bites union types. (5) Omitting required fields from objects you instantiate elsewhere — TypeScript will require the omitted field still being provided, which is sometimes desired (Pick + Required pattern more explicit). (6) Performance — heavy Omit chains can slow down TypeScript compilation on large codebases (TS 5.0+ improvements help).
How is Omit different from Exclude?▼
They look similar but operate at different levels. Omit<Type, Keys>: works on OBJECT types — removes specified properties from a type. Result: a new object type. Exclude<Type, ExcludedUnion>: works on UNION types — removes specified members from a union. Result: a new union type. Example: type Result1 = Omit<{ a: 1; b: 2 }, "a">; // { b: 2 } — object type with property removed. type Result2 = Exclude<"a" | "b" | "c", "a">; // "b" | "c" — union with member removed. They're composable: Omit is implemented as Pick<T, Exclude<keyof T, K>>. Use Omit for object property removal; Exclude for union narrowing.
What other TypeScript utility types pair well with Omit?▼
Common pairings 2026: (1) Partial — Partial<Omit<User, "id">> for update payloads (all fields optional except id is removed). (2) Required — Required<Omit<Config, "internal">> for fully-required public config. (3) Readonly — Readonly<Omit<Document, "_id" | "_rev">> for immutable public documents. (4) Pick — combined chains: Pick<Omit<Full, "private">, "name" | "email">. (5) Mapped types — { [K in keyof Omit<T, "id">]: Validator<T[K]> }. (6) Conditional types — type CleanResponse<T> = T extends { error: any } ? Omit<T, "data"> : T;. The standard utility types compose orthogonally — most production TS codebases combine 3-5 utility types in any non-trivial type.