-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
π Version & Regression Information
This is the behavior in every version I tried.
β― Playground Link
Playground link with relevant code
π» Code
let x1: { data: { a: string } } = { data: { a: "hello", b: true }}; // Excess property error
let x2: { data: { a: string } } & { x?: string } = { data: { a: "hello", b: true }}; // Excess property error
let x3: { [key: string]: { a: string } } = { data: { a: "hello", b: true }}; // Excess property error
let x4: { [key: string]: { a: string } } & { x?: string } = { data: { a: "hello", b: true }}; // No error!π Actual behavior
No excess property error on the last line of example.
π Expected behavior
Excess property errors on all lines of example.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue