Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Typescript generates enumerable methods #136

Open
BurtHarris opened this issue Aug 6, 2017 · 2 comments
Open

Typescript generates enumerable methods #136

BurtHarris opened this issue Aug 6, 2017 · 2 comments

Comments

@BurtHarris
Copy link
Collaborator

BurtHarris commented Aug 6, 2017

@jayphelps it seems that Typescript is generating methods (in classes) with the enumerable property set to true. I've found an issue tracking this as a bug microsoft/TypeScript#15308, it but there seem to be older related issues and I'm guessing it isn't currently a high priority.

This is causing some tests of this projects to fail. I had misinterpreted it earlier as being related to the property descriptor limitation, but this seems to be separate. For some decorators (e.g. autobind) it would be simple for us to change the returned descriptor to make the test pass, do you think that's a good idea, or should we do something to the tests?

@BurtHarris
Copy link
Collaborator Author

 1) @autobind (from TypeScript) sets the correct prototype descriptor options:

      enumerable property mismatch
      + expected - actual

      -true
      +false

      at Context.<anonymous> (test\typescript\autobind.spec.ts:75:28)

  4) @decorate (from TypeScript) sets the correct prototype descriptor options:

      enumerable
      + expected - actual

      -true
      +false

      at Context.<anonymous> (test\typescript\decorate.spec.ts:55:28)

@jayphelps
Copy link
Owner

Hmm did you link to the right issue? microsoft/TypeScript#15308 ? It's not clear how it relates 😄

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

2 participants