-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
装饰器的提案已经更新 #661
Comments
我粗粗看了一下,变化没有想象的那么大。 后面找时间仔细看具体的差异,再修改掉具体的内容。 |
装饰器提案再7月底的tc39会议差不多就到stage3了。 最新的提案也接收一个对象,但这个对象不仅仅有属性描述符,还有kind类型用于判断是类还是类属性或者类方法。返回值还有init函数,extras 对象(可用于注解),finisher 函数用于类声明完成后要做的工作。 内容太多,感觉几乎需要重写这一章,所以不太好PR。如果阮老师出一个这本书规范出来,我有空可以帮忙。(只是修改一些部分然后PR还有自信做 orz) https://github.com/tc39/proposal-decorators/blob/master/METAPROGRAMMING.md |
这一章肯定重写。 目前再消化一下,也等等看,有没有示例出来,要是有实现支持就更好了。 |
还在进行中 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看了最新的装饰器提案,阮老师的书上的应该是旧提案
变化有些大真得很大,我觉得有必要加一段说明书上写的是旧提案。
The text was updated successfully, but these errors were encountered: