typescript常见类型声明

2019-08-30
阅读 2 分钟
1.9k
以下代码截取自es5的声明前提说明:T是接口,方便理解,实际情况可能是复杂类型interface T {name: stringage: numbersex: 'male' | 'female'}还有一点:keyof T === 'name' | 'age' | 'sex'

typescript 2.9.x +webpack 4.16.x + react 16.4.x

2018-08-21
阅读 7 分钟
2.3k
typescript 2.9.x +webpack 4.16.x + react 16.4.x 从零开始,配置简单可自由更改,按需加载antd 3.8的组件,包括样式前言: 由于网上找不到typescript结合react,并按需加载antd的教程,于是开始踩坑。该过程中发现 1 “cannot resolve module 'antd'” (tsconfig 中设置moduleResolution: "node”,告诉webpack去相应的n...

antd typescript版源码学习

2018-02-08
阅读 4 分钟
6.6k
GitHub上的antd是用typescript实现的,目前我在学习typescript,因此fork了一份antd的源码。学习过程中发现学习曲线很陡峭,不适合新手,因此想把antd中适合新手的东西(各个组件的typescript源码)剥离出来,做到零配置,方便学习。