-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
From @Duckers on January 16, 2018 11:47
Apologies if this is the wrong repo for Intellisense suggestions, if so, please redirect me.
- VSCode Version: 1.19.1
- OS Version: MacOS 10.13
A very common scenario when writing TypeScript (coming from C#) is that I forget to prepend this.
when I want to reference a member of the current class. My muscle memory also relies a lot on the intellisense to complete the names of members. This very often results in the code completer completing an identifier with a very unlikely option from the global namespace, instead of simply prepending this.
to refer to a local member.
Example:
import { Post } from 'Server/Boost/Post'
export default class PostComponent {
Options = {} as Post.Post
get hasImage() {
return Opt<caret here, pressing enter>
}
}
This ends up completing as HTMLOptionElement
or something similar, when this.Options
would have been a much more probable intention.
Copied from original issue: microsoft/vscode#41668