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)
TypeScript Version: nightly (2.2.0-dev.20170124)
Code
(based on
tests/cases/fourslash/findAlRefsObjectSpread.ts)Expected behavior:
Find-all-refs for
aina123.amatches theain all ofA1,A2,A3.Actual behavior:
It only matches the
ainA3. If one of the spread elements in the definition ofa123is removed, then it will correctly highlight both remaining spread elements.CC Nathan Shively-Sanders (@sandersn)