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?

贡献者指南