Skip to content

#31711 breaks assignability #31762

Closed
@sandersn

Description

@sandersn
// @strict: true
function g(headerNames: any) {
    let t = [{ hasLineBreak: false, cells: [] }];
    const table = [{cells: headerNames }].concat(t);
}

Expected behavior:
No error.

Actual behavior:
Error on concat(t): { hasLineBreak: boolean, cells: never[] } is not assignable to { cells: any }. hasLineBreak is missing.

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions