摘要: 一、使用create-react-app创建一个支持TypeScript+React的开发环境: 要创建一个支持TypeScript的Create React App项目,可以运行: npx create-react-app my-app --template typescript # or yar 阅读全文
posted @ 2020-12-08 22:53 Samve 阅读(5141) 评论(0) 推荐(0) 编辑
摘要: 一、yield可以传参: function* show() { console.log('a'); let a = yield 123; // a被gen.next(5)传入5 console.log(a); console.log('b'); return 23456; } let gen = s 阅读全文
posted @ 2020-12-08 22:51 Samve 阅读(208) 评论(0) 推荐(0) 编辑