#How to get better autocomplete suggestion from VS Code?
8 messages · Page 1 of 1 (latest)
Are you saying because the variable is declared to have ContactRequest type, it should prioritize suggestion new ContactRequest?
No that's not a thing, and the typical way to write code is just omit the type on the left side:
const contReq = new ContactRequest(...)
There is a lot of instances where autocomplete either suggests something unrelated, or the ordering of the suggestions are weird. There is a few issues on this topic on GitHub too.
I'm aware Typescript will infer the type, but are you saying that autocomplete missing such an obvious thing is normal? VS Code suggestions are not logical.
Suggestions are provided by the language server (in this case TS language server), not by the IDE (VS Code)
Visual Studio has Intellicode built in by default (https://visualstudio.microsoft.com/services/intellicode/) and one of the feature is indeed putting better completion items on top.
Intellicode is also available on VS Code: https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode