Babel 7.2.0 已发布,Babel 是用于编写下一代 JavaScript 的编译器。此版本包含对私有实例方法的支持以及一些围绕 Flow 和 TypeScript 类的 bug 修复。 更新亮点 Private Instance Methods (#8654) class Person {
#age = 19;
#increaseAge() {
this.#age++;
}
birthday() {
this.#increaseAge();
alert("Happy Birthday!");
}
}"Smart" Pipeline Operator Parsing (#8289) // "Smart" const result = 2 |> double |> 3 + # |> toStringBase(2, #); // "111" // "Simple" const result = 2 |> double |> (x => 3 + x) |> (x => toStringBase(2, x)); Plugin Names (#8769)
发行说明: |