Skip to content

Deep intersections stopped working in 4.9 #52397

@SephReed

Description

@SephReed

Bug Report

🔎 Search Terms

Deep union no longer work

🕗 Version & Regression Information

  • This is a crash: no
  • This changed between versions _4.8 and 4.9
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about yes_
  • I was unable to test this on prior versions because tested on prior versions, is regression___

⏯ Playground Link

Playground link with relevant code

💻 Code

type G = { props: (
  { a: { foo: 1 }}
  & { a: { bar: 2 }}
)} & { props: { a: { qux: 3}}}

const g: G = {
  props: {
    a: {
      foo: 1,
      bar: 2,
      qux: 3,  // gives error in 4.9, not in 4.8
    }
  }
}

🙁 Actual behavior

qux gives error:

Object literal may only specify known properties

🙂 Expected behavior

Continues working as it had before

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions