jashkenas/coffeescript

Grammar, Nodes: Class fields/class property initializers

Open

#4,552 opened on May 16, 2017

View on GitHub
 (24 comments) (1 reaction) (0 assignees)CoffeeScript (16,577 stars) (1,980 forks)batch import
enhancementhelp wanted

Description

We should be able to write the equivalent of

class C {
  b = 3;
  c = () => 4;
}

Can it be

class C
  b: 3
  c: () => 4;

or does the b property have different semantics?

Contributor guide

Grammar, Nodes: Class fields/class property initializers · jashkenas/coffeescript#4552 | Good First Issue