The Wayback Machine - https://web.archive.org/web/20201128063323/https://github.com/microsoft/TypeScript/issues/41688
Skip to content
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

Provide correct intellisense completion/suggestion list after `infer` keyword. #41688

Open
heroboy opened this issue Nov 25, 2020 · 0 comments · May be fixed by #41704
Open

Provide correct intellisense completion/suggestion list after `infer` keyword. #41688

heroboy opened this issue Nov 25, 2020 · 0 comments · May be fixed by #41704

Comments

@heroboy
Copy link

@heroboy heroboy commented Nov 25, 2020

Search Terms

Suggestion

When inputing code:

type SomeType<T> = T extends [infer X,infer Y]?any:any;

When you typing at X, the current completion list is a list of existing types, for example XMLDocument.
In vscode, when you typed X it is very easy mistakenly accept the wrong suggestion.(The setting "editor.acceptSuggestionOnCommitCharacter" default is true).

I think it should be a list like inputting class X, type X.

p.s. there's similar issue when inputting the infer keyword.

Use Cases

Examples

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.