Closed
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.