Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Function becomes a contructor when 'this' is used. #15

Open
aeschli opened this issue May 7, 2020 · 0 comments
Open

Function becomes a contructor when 'this' is used. #15

aeschli opened this issue May 7, 2020 · 0 comments

Comments

@aeschli
Copy link
Owner

aeschli commented May 7, 2020

Reproduced with

const x = {
  xy: function () {
    this.id = 42;
  }
}

The appearance of a this makes typescript think this is a class.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant