jashkenas/coffeescript

Grammar, Nodes: Class fields/class property initializers

Open

#4,552 建立於 2017年5月16日

在 GitHub 查看
 (24 留言) (1 反應) (0 負責人)CoffeeScript (1,980 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (16,577 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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?

貢獻者指南