摘要: 1、Promise对象 promise异步操作有三种状态:pending(进行中)、fulfilled(已成功)和rejected(已失败) promise对象只有从pending变为fulfilled和从pending变为rejected的状态改变。只要处于fulfilled和rejected时, 阅读全文
posted @ 2020-05-11 17:16 好好学习、天天向上~ 阅读(488) 评论(0) 推荐(0)
摘要: decorator是 一个函数,用来修改类的行为,在代码编译时产生作用 一、类修饰 一个参数 第一个参数是target,指向类本身 function testable(target) { target.isTestable = true } @testable class Example {} Ex 阅读全文
posted @ 2020-05-11 15:23 好好学习、天天向上~ 阅读(1607) 评论(0) 推荐(1)