jashkenas/coffeescript

Grammar, Nodes: Class fields/class property initializers

Open

#4552 aperta il 16 mag 2017

Vedi su GitHub
 (24 commenti) (1 reazione) (0 assegnatari)CoffeeScript (1980 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (16.577 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor