Skip to content

Typed this in JavaScript Object Literals #16184

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#27693

TypeScript Version: 2.3.4

const obj = {
    prop: 2,

    method() {
        this.prop|
    }
}

#14141 added typing for this in object literals in certain cases. Should this also be applied in regular JavaScript for intellisense, perhaps in a less strict form? We currently do not return any suggestions for this.| in obj

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions