Skip to content

Typed this in JavaScript Object Literals #16184

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy