Proposal static type constraints features

YU HengChun achun.shx at
Sun Jun 3 16:51:20 UTC 2018

ps: Accidentally, the email just sent was sent to isiah. This is a copy

TS/Flow is better about static type constraints.

If the syntax of TS/Flow can enter the proposal, I will not submit this proposal.

The only benefits of this grammar are:

Even if the proposal cannot be passed, it will still work, at least for the type description.

So, in reality, this proposal will still be used. Of course, additional tools are needed.

At least code is not to tranfrom, is standard, legal, and can run ECMAScript.

这个语法真的不比 TS/Flow 好啥.
如果类似 TS/Flow 的语法能进入讨论阶段, 我也不用提交这个提案了. 

即时因为某种原因无法通过, 至少类型描述部分是有效的.

所以, 在现实中, 这个提案还是会被使用, 因为它是合法的代码. 当然, 如果要让静态类型约束生效,
还需额外的工具配合(也是不想写这个工具, 我才提交提案的啊).

无论如何, 代码是合法的, 可运行的标准 ECMAScript, 再也不用转换了.

More information about the es-discuss mailing list