docs: edit decorator

This commit is contained in:
ruanyf
2019-02-09 20:37:44 +08:00
parent 546b9d3bce
commit f13a2b50a7
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1,5 +1,7 @@
# 修饰器
[说明] Decorator 提案经过了大幅修改,目前还没有定案,不知道语法会不会再变。下面的内容完全依据以前的提案,已经有点过时了。等待定案以后,需要完全重写。
## 类的修饰
许多面向对象的语言都有修饰器(Decorator)函数,用来修改类的行为。目前,有一个[提案](https://github.com/tc39/proposal-decorators)将这项功能,引入了 ECMAScript。