TypeScript TS2741: Property is missing in type but required
TS2741 means the target type requires a property your value lacks. Fix the interface, the conditional spread, or the builder that dropped it.

Introduction & Quick Summary
error TS2741: Property 'email' is missing in type '{ id: number; name: string; }'
but required in type 'User'.TS2741 means the target type has a required property that the value you assigned does not carry. It is not a type-inference failure and not a syntax problem: TypeScript resolved both sides, compared their members, and found one required member absent from the source.
The three facts that decide the fix:
- Is the property genuinely required? If a user object can legitimately exist without
email, the target interface is wrong, not the value. - Is the value built incrementally? Objects assembled with conditional spreads lose required members, because the spread operand widens to
{ email?: string }orfalse. - Is the target a mapped or generic type?
Pick,Omit,PartialandRequiredchange which members are required, and the error names the mapped result, notUser.
| Symptom in the message | Real cause | First check |
|---|---|---|
| One property named | Literal object short of a required field | The interface declaration |
| Property is optional in your head | Partial not applied, or another User import | The resolved type via hover |
| Comes from a spread | Conditional spread produced an optional member | The spread operand type |
| Appears in a generic function | Constraint requires more than the default | The constraint on T |
| Appears only in CI | exactOptionalPropertyTypes or a second tsconfig | The build config |
Core Mechanics, Signatures & Reproducible Setup
TypeScript checks assignability structurally. { id: number; name: string } is assignable to a type only when every required member of the target exists in the source with a compatible type. TS2741 is the "present but incomplete" branch of that check; TS2739 covers two or more missing members, TS2353 covers excess properties in a fresh object literal, and TS2322 wraps the same mismatch when it happens through an assignment.
Reproduce it in a file with strict enabled:
interface User {
id: number;
name: string;
email: string;
}
const draft = { id: 1, name: "Ada" };
const user: User = draft;
// error TS2741: Property 'email' is missing in type
// '{ id: number; name: string; }' but required in type 'User'.The check is not limited to declarations. Function arguments, return values and generic instantiations all produce the same code:
function save(user: User) {}
save({ id: 1, name: "Ada" }); // TS2741
function makeUser(): User {
return { id: 1, name: "Ada" }; // TS2741
}The minimal correct version depends on intent, not on the compiler:
interface User {
id: number;
name: string;
email?: string; // optional when absence is legal
}
const draft: User = { id: 1, name: "Ada" }; // okTo inspect what the compiler actually resolved, hover the target type in an editor that uses the project's TypeScript version, or print it:
type Debug = User;
declare const probe: Debug;
// hover `probe` in the editor: id: number; name: string; email: stringA second User declared in another module is the most common reason a property "looks present". Import one canonical type and re-export it rather than redeclaring it.
Key Comparison Table
| Error code | Meaning | Typical trigger |
|---|---|---|
| TS2741 | One required property missing | Partial object literal |
| TS2739 | Several required properties missing | Empty or unrelated object |
| TS2322 | Value not assignable to target | Variables, not fresh literals |
| TS2353 | Excess property in fresh literal | Typo or stale field |
| TS2551 | Property does not exist, did you mean | Misspelled optional field |
| TS18048 | Value possibly undefined | strictNullChecks on access |
| Fix | When it is correct | Cost |
|---|---|---|
Make the field optional email?: | Absence is a valid state | Consumers must narrow |
| Supply the field | The value is genuinely incomplete | Extra mapping code |
Use Partial<User> | Update payloads, patches | Loss of required guarantees |
Use Required<User> | Enforce complete input | Throws on optional sources |
satisfies User | Check without widening | Needs TS 4.9+ |
Type assertion as User | Only after a runtime check | Silences the compiler |
Practical Edge Cases, Error Fixes & Deep Dive Code Examples
Case 1: Conditional spread drops a required member
interface Payload { id: string; role: string }
const isAdmin = false;
const payload: Payload = {
id: "u1",
...(isAdmin && { role: "admin" }),
};
// TS2741: Property 'role' is missing ...The spread of false contributes nothing, and TypeScript models the resulting object as having role?: string | undefined, which cannot satisfy a required role. Use an always-object operand:
const payload: Payload = {
id: "u1",
...(isAdmin ? { role: "admin" } : {}),
};Case 2: Function argument with a partial patch
function updateUser(id: string, patch: Partial<User>) {}
updateUser("u1", { email: "a@b.c" }); // ok
updateUser("u1", { id: 2 }); // ok, id is optional herePartial<T> maps every member to optional, which removes TS2741 at the call site but pushes the check into the function body, where patch.email is now string | undefined. Keep the required/optional split explicit instead of applying Partial to whole domain types:
type UserPatch = Partial<Pick<User, "name" | "email">>;Case 3: Nested objects report the innermost property
interface Address { city: string; zip: string }
interface Customer { id: string; address: Address }
const c: Customer = { id: "c1", address: { city: "Busan" } };
// TS2741: Property 'zip' is missing ... but required in type 'Address'Read the type named at the end of the message. It points at the nested interface, so the fix belongs in the nested literal, not in Customer.
Case 4: implements with an optional interface member
interface Named { name: string; nickname?: string }
class Person implements Named {
name = "Ada";
}This compiles: implements checks the instance type, and an optional member may be absent. If the class must expose the property for reflection or serialization, declare it explicitly:
class Person implements Named {
name = "Ada";
nickname: string | undefined;
}With exactOptionalPropertyTypes the two forms differ: nickname?: string does not accept undefined as a value, while nickname: string | undefined does.
Case 5: Discriminated unions built step by step
type Event =
| { kind: "click"; x: number; y: number }
| { kind: "key"; code: string };
const e: Event = { kind: "click", x: 10 };
// TS2741 (and TS2322): property 'y' is missingPartial construction of a union member is always rejected, because the object must match one member exactly. Build with a factory that returns the complete member, or use a builder whose final step returns the union:
function click(x: number, y: number): Event {
return { kind: "click", x, y };
}Case 6: satisfies for config objects
type Config = { retries: number; timeoutMs: number };
const config = {
retries: 3,
timeoutMs: 5_000,
verbose: true,
} satisfies Config;satisfies validates the literal against Config while keeping the narrow inferred type, so config.verbose remains accessible. Using : Config here would reject the extra key with TS2353 and remove verbose from the type. If a required key depends on the environment, compute it before the literal rather than adding it conditionally.
Re-exported types drifting apart.
// src/types.ts
export interface User { id: number; name: string; email: string }
// src/api/types.ts (stale copy)
export interface User { id: number; name: string }A value typed by the first User fails against the second. Collapse duplicates into one module and re-export:
export type { User } from "../types";Common Compilation/Runtime Mistakes & Version Gotchas
strictNullChecksoff masks the error. Without it, missing members widen toundefined-bearing optional shapes in some inference paths, so the error appears only after enablingstrict. Enable it before fixing interfaces, or the fixes will be wrong.exactOptionalPropertyTypes(TS 4.4+) distinguishesemail?: stringfromemail: string | undefined. A patch object that setsemail: undefinedcompiles under the default and fails under this flag.satisfiesrequires TS 4.9+. On older compilers the operator is a syntax error, not a type error, so a CI using a pinned old version fails differently than the editor.- Declaration files override source. If
@types/*or a local.d.tsaugments the interface with a required member, the error appears with no visible change in your file. Search fordeclare moduleandinterface Userbefore editing the literal. Omiton a union collapses the union.Omit<A | B, "kind">distributes poorly and can require members that only one branch had; wrap it in a distributive conditional type when the target is a union.- Enum and literal widening.
let role = "admin"widens tostringand fails againstrole: "admin"; useconstoras const. This is reported as TS2322 at the assignment and TS2741 once wrapped in an object.
When the two shapes come from different services, paste both JSON responses into the JSON formatter and compare the key sets with the diff tool before deciding which field is genuinely required. For a reviewable normalization query over existing rows, the SQL formatter keeps the migration readable.
Primary references: Object Types covers optional and required members, and the strict family documents strictNullChecks and exactOptionalPropertyTypes as separate switches.
Official references
primary documentationThe TypeScript documentation that defines the behaviour this guide explains.
Try matching browser tools
All toolsSmall utilities that fit TypeScript work — they run entirely in this browser tab, so nothing you paste leaves your device.
Related TypeScript guides
All TypeScript guidesTypeScript TS2349: This expression is not callable
TS2349 means the value has no call signature at that point. Narrow unions, fix module default imports and guard optional calls instead of asserting.
TypeScript: Cannot find name 'process' with @types/node
TS2304 on process or Buffer means the compiler has no Node declarations. Install @types/node, stop excluding it, and align its version to the runtime.
TypeScript TS2532: Object is possibly 'undefined'
TS2532 means strict null checks cannot prove a value exists before reading through it. Guard it, add optional chaining, or narrow the type at the source.
TypeScript TS18046: 'e' is of type 'unknown'
TS18046 comes from useUnknownInCatchVariables: a caught error is unknown, not any. Narrow it with instanceof or a type guard before reading message.
More in TypeScript
All TypeScript guidesThe guides filed next to this one in TypeScript, in library order.