Skip to content

Add support for emitting static properties in class expressions in ES6.#2603

Merged
CyrusNajmabadi merged 4 commits into
masterfrom
staticClassProps
Apr 3, 2015
Merged

Add support for emitting static properties in class expressions in ES6.#2603
CyrusNajmabadi merged 4 commits into
masterfrom
staticClassProps

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Fixes #2574

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test with a decorator as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current approach should work.

_a = class C {} ,
_a = __decorate(C, dec),
_a.a = 1,
_a;

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Apr 3, 2015

👍

Comment thread src/compiler/emitter.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let

CyrusNajmabadi added a commit that referenced this pull request Apr 3, 2015
Add support for emitting static properties in class expressions in ES6.
@CyrusNajmabadi CyrusNajmabadi merged commit d56f2f6 into master Apr 3, 2015
@CyrusNajmabadi CyrusNajmabadi deleted the staticClassProps branch April 3, 2015 21:03
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Class expression emit in ES6 is not correct

5 participants