You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Goto definition after field exclusion should go to prop signature #23216
At this point the compiler really can not track the key back to its declaration. Exclude<keyof A, B> just returns a list of literal types, then the map type generates a new type with properties of the same name..
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Andy (Andrewkraft) (@Andy-MS) It's a matter of setting up a trail of synthetic symbols with pointers back to their original symbol. I don't know if getIndexAccessType do this when it is working on 0-order properties. If not, that's the place that would need to change.
Activity
mhegazy commentedon Apr 6, 2018
At this point the compiler really can not track the key back to its declaration.
Exclude<keyof A, B>just returns a list of literal types, then the map type generates a new type with properties of the same name..cevek commentedon Apr 6, 2018
I know that is not possible for everything, but maybe you can track some information where from came this symbol if it possible?
In the example above we definitely know that
asymbol came fromkeyof Foowith defined position in the code.cevek commentedon Apr 6, 2018
Conditional types is very powerful feature, but with this behaviour without go to definition you also cannot rename refactor
mhegazy commentedon Apr 6, 2018
The probable is once it goes through literal types, context is lost.. We would be happy to discuss a proposal on how this can be added.
cevek commentedon Apr 6, 2018
Andy (Andrewkraft) (@Andy-MS) Here is corner case example where it doesn't work as we expected,
but anyway your solution is good and simple
typescript-bot commentedon Apr 21, 2018
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
sandersn commentedon Apr 23, 2018
Andy (Andrewkraft) (@Andy-MS) It's a matter of setting up a trail of synthetic symbols with pointers back to their original symbol. I don't know if getIndexAccessType do this when it is working on 0-order properties. If not, that's the place that would need to change.