TypeScript/tests/cases/compiler/deeplyNestedAssignabilityIssue.ts
Wesley Wigham 84f5aa540e
Put error spans deep on nested object literals (#25140)
* Add ncie deep elaborations

* Nice stuff

* Modify tuple error to use length error mroe often

* Accept good baselines

* Accept meh baselines

* Fix literal types

* Calculate elaborations like it was the very first time again~

* Use tristate for enum relationship to ensure elaborations are printed at least once

* Update message text, nits

* move some functions back to where they were

* Add test of deep JSX elaboration

* Add elaboration test with parenthesized expressions, comma expressions, and assignments

* Move check to allow elaborations on more anonymous types

* Fix nits

* Add specialized error to elaborations of nonliteral computed named-members

* Update error message
2018-07-03 19:40:58 -07:00

31 lines
478 B
TypeScript

// @pretty: true
interface A {
a: number;
}
interface Large {
something: {
another: {
more: {
thing: A;
}
yetstill: {
another: A;
}
}
}
}
const x: Large = {
something: {
another: {
more: {
thing: {}
},
yetstill: {
another: {}
}
}
}
}