Skip to content

Error in find-all-references for 3 spread types #13654

Description

TypeScript Version: nightly (2.2.0-dev.20170124)

Code

(based on tests/cases/fourslash/findAlRefsObjectSpread.ts)

interfaceA1{a: string};interfaceA2{a?: number};interfaceA3{a?: RegExp};declareleta1: A1;declareleta2: A2;declareleta3: A3;leta12={ ...a1, ...a2, ...a3};a12.a;

Expected behavior:

Find-all-refs for a in a123.a matches the a in all of A1, A2, A3.

Actual behavior:

It only matches the a in A3. If one of the spread elements in the definition of a123 is removed, then it will correctly highlight both remaining spread elements.

CC Nathan Shively-Sanders (@sandersn)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions