Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

TypeScript · Type Alias

Omit

Omit<Type, Keys> creates a new type with all properties from Type except the keys listed in Keys. It is globally available and complements Pick.

Since
3.5

How it works

Omit constructs a new object type from an existing type by retaining every property except the keys specified in its second type argument. The keys can be a string literal or a union of string literals, making it useful for deriving variants without repeating the original declaration.

Syntax

Omit<Type, Keys>

Parameters

NameTypeDescription
TypetypeThe object type whose properties form the starting point.
Keysstring literal or union of string literalsA string literal or union of string literals naming properties to remove.

Returns

A type containing all properties of Type except the properties named by Keys.

Key points

  • It derives a new type by retaining the source type's properties and excluding the specified keys.
  • The keys argument accepts one property name or a union of property-name literals.
  • No import is needed because Omit is provided as a global utility type.
  • Omit is the complementary operation to Pick: it expresses exclusion rather than selection.

Common mistakes

  • Omit removes named properties, whereas Pick selects only the named properties.

Example: Remove a property from an object type

type Person = {
  name: string;
  age: number;
  location: string;
};

type PersonWithoutLocation = Omit<Person, "location">;

const person: PersonWithoutLocation = {
  name: "Ada",
  age: 36,
};

The resulting type keeps name and age while excluding location.

When to use it

Create a restricted object shape

Derive a public or update-facing model while excluding internal or immutable fields.

Reuse an existing model

Build related variants without duplicating a base interface or type alias.

Exclude a set of keys

Remove multiple fields by passing a union of property-name literals.

Interview questions

QWhat does Omit do, and what can its Keys argument contain?

Omit<Type, Keys> creates a type containing all properties from Type except those listed by Keys. Keys may be one string literal or a union of string literals.

Follow-up: How does it relate to Pick? Pick keeps only selected properties, while Omit removes selected properties from the complete property set.

QWhy use Omit instead of redefining a similar object type?

Omit is a globally available TypeScript utility type. It is useful when a derived type should preserve the source shape except for a small block-listed set of properties.

Follow-up: What is a common alternative when the desired result is an allow-list? Use Pick with the properties that should remain.

QWhen was Omit introduced and how is it parameterized?

The utility was released in TypeScript 3.5. Its declaration is generic: the first parameter supplies the source type and the second supplies the keys to remove.

Follow-up: What happens if several keys must be excluded? Pass a union of string literal keys as the second argument.

  • Pick
  • Partial
  • Required
  • Readonly
  • Exclude

Source: Utility Types. Checked 2026-10-15.