Skip to content

Support string literal completions inside failed call #20843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Dec 21, 2017 · 1 comment
Closed

Support string literal completions inside failed call #20843

ghost opened this issue Dec 21, 2017 · 1 comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Milestone

Comments

@ghost
Copy link

ghost commented Dec 21, 2017

TypeScript Version: Version 2.7.0-dev.20171219

Code

declare function pick<T>(obj: T, key: keyof T): void;
pick({ x: 0 }, "");

Expected behavior:

Get contextual-type completion of "x" inside the "".

Actual behavior:

No useful completions.

@ghost ghost added the Domain: Completion Lists The issue relates to showing completion lists in an editor label Dec 21, 2017
@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Experience Enhancement Noncontroversial enhancements labels Oct 18, 2018
@RyanCavanaugh RyanCavanaugh assigned ghost Oct 18, 2018
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.3 milestone Oct 18, 2018
@weswigham weswigham removed the Suggestion An idea for TypeScript label Nov 6, 2018
@weswigham weswigham unassigned ghost Dec 13, 2018
@RyanCavanaugh RyanCavanaugh added the Suggestion An idea for TypeScript label Mar 7, 2019
@RyanCavanaugh RyanCavanaugh removed this from the TypeScript 3.4.0 milestone Mar 14, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Aug 16, 2019
@jakebailey
Copy link
Member

Just looking at old issues; this was fixed in #26646 and has a test which covers this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants