mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-28 21:32:20 +00:00
doc: ES7 feature list
This commit is contained in:
parent
40437de61a
commit
fd088aceab
@ -624,22 +624,34 @@ fs.writeFileSync('out.js.map', result.sourceMap);
|
||||
|
||||
**Stage 0**:
|
||||
|
||||
- es7.comprehensions:数组推导
|
||||
- es7.classProperties:类的属性
|
||||
- es7.functionBind:函数的绑定运算符
|
||||
- Function Bind Syntax 函数的绑定运算符
|
||||
- String.prototype.at 字符串的静态方法at
|
||||
|
||||
**Stage 1**:
|
||||
|
||||
- es7.decorators:修饰器
|
||||
- es7.exportExtensions:export的扩展写法
|
||||
- es7.trailingFunctionCommas:函数参数的尾逗号
|
||||
- Class and Property Decorators Class的修饰器
|
||||
- Class Property Declarations Class的属性声明
|
||||
- es7.exportExtensions:export的写法改进
|
||||
- String.prototype.{trimLeft,trimRight} 字符串删除头尾空格的方法
|
||||
|
||||
**Stage 2**:
|
||||
|
||||
- es7.exponentiationOperator:指数运算符
|
||||
- es7.asyncFunctions:async函数
|
||||
- es7.objectRestSpread:对象的Rest参数和扩展运算符
|
||||
|
||||
**Stage 3**
|
||||
|
||||
- SIMD API “单指令,多数据”命令集
|
||||
- Async Functions async函数
|
||||
- Object.values/Object.entries Object的静态方法values()和entries()
|
||||
- String padding 字符串长度补全
|
||||
- Trailing commas in function parameter lists and calls 函数参数的尾逗号
|
||||
- Object.getOwnPropertyDescriptors Object的静态方法getOwnPropertyDescriptors
|
||||
|
||||
**Stage 4**:
|
||||
|
||||
- Array.prototype.includes 数组实例的includes方法
|
||||
- Exponentiation Operator 指数运算符
|
||||
|
||||
ECMAScript当前的所有提案,可以在TC39的官方网站[Github.com/tc39/ecma262](https://github.com/tc39/ecma262)查看。
|
||||
|
||||
Babel转码器可以通过安装和使用插件来使用各个stage的语法。
|
||||
|
Loading…
x
Reference in New Issue
Block a user