Skip to content

this in function declarations inside object literals should be typed #8110

Closed
@sandersn

Description

@sandersn
let o = {
  f: function () { this./**/ }
}

Expected: Intellisense shows 'f' in the list
Actual: Intellisense shows nothing because this: any.

Note that this similar code already works:

let o = {
  f() { this./**/ }
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions