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

[typescript] Offer IntelliSense suggestions based on method parameter or local type #37771

Closed
rstarkov opened this issue Nov 7, 2017 · 1 comment
Assignees
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@rstarkov
Copy link

rstarkov commented Nov 7, 2017

It would be useful if IntelliSense offered suggestions based on the expected type of the expression being edited. Consider the following examples:

function Foo(thing: Namespace.Stuff.SomeClass) { ... }

Foo(new |
        ^ here

let x: Namespace.Stuff.SomeClass;
x = new |
        ^ here

In these cases, "Namespace.Stuff.SomeClass" should be offered by IntelliSense at the indicated positions.

This behaviour would also be handy for enums: the enum type could be offered in the same contexts as above (without the new keyword obviously).

For enums there's another scenario where this would be handy, namely when I'm comparing an enum-typed local or parameter - IntelliSense should offer the enum type for autocompletion after I type the comparison operator.

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 9, 2017

This issue was moved to microsoft/TypeScript#19855

@mjbvz mjbvz closed this as completed Nov 9, 2017
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Nov 9, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants