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
Completion list should include property names of constraining type when writing object type literals in type argument positions #33302
I was kind of expecting to be given some hints about what keys I needed when writing this:
declareconsts: SomeGeneric<{apple: "hey";banana: 123;// <-- no IntelliSense here for anything but "readonly"}>;
Instead, I only seem to get a suggestion for readonly. It would be very helpful if apple, banana, and cherry were part of the completion list.
Use Cases
I would think this is useful anytime you're specifying a constrained generic parameter, or possibly even extending an existing interface. Its absence is painful in any case where the generic type has lots of members, as in this Stack Overflow question.
changed the title [-]Completion list for members when specifying constrained generic?[/-][+]Completion list should include property names of constraining type when writing object type literals in type argument positions[/+]on Sep 12, 2019
William Luke (@williamluke4) sorry I missed your message. There is currently another community PR that seems like it's on the right track if you're still interested in contributing and want to get a good handle on what the work here involves.
Activity
[-]Completion list for members when specifying constrained generic?[/-][+]Completion list should include property names of constraining type when writing object type literals in type argument positions[/+]williamluke4 commentedon Feb 3, 2021
Daniel Rosenwasser (@DanielRosenwasser) If someone can point me in the right direction. I don't mind having a go at implementing this
DanielRosenwasser commentedon Apr 5, 2021
William Luke (@williamluke4) sorry I missed your message. There is currently another community PR that seems like it's on the right track if you're still interested in contributing and want to get a good handle on what the work here involves.
DanielRosenwasser commentedon Apr 20, 2021
Fixed by #43526. Thanks Tiago Tristao (@tiagovtristao)!