-
-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
many antd 2.0.1 *.d.ts files couldn't pass the compiling of tsc #3358
Comments
PS: the "disabled" property is also missed in SwitchProps in switch/index.d.ts. |
Could u help us improve these issues, cause we are short of hands right now. 🤓 |
@afc163 No problem. I am writing a new app demo using typescript 2.0 and antd 2.0, when it is done I will return my patch files to the community for review. |
Thx! @AlbertZheng ref #3170 |
* Fixes for supporting TypeScript 2.0.3 * Fixes for supporting TypeScript 2.0.3. Issue is #3358
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
发生问题的环境是:
您做了什么?
将项目从antd 1.11.1升级到antd 2.0.1
您期待的结果是:
能通过tsc编译。
实际上的结果是:
不少antd components的d.ts文件不能通过tsc编译。编译错误说明如下:
When migrated from antd 1.11.x to 2.0.1, there are many errors reported by tsc 1.8.10 and 2.0.3 as the following. Please have a check:
A workaround for TS7006 is to manually add any or any[] type declaration for those parameter in the reported d.ts files. But this error "TS2307: Cannot find module 'rc-select'" perhaps will need to write a index.d.ts for rc-select component.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/upload/interface.d.ts
(30,23): error TS7006: Parameter 'File' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/select/index.d.ts
(2,34): error TS2307: Cannot find module 'rc-select'.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/select/index.d.ts
(38,17): error TS7006: Parameter 'value' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/icon/index.d.ts
(5,16): error TS7006: Parameter 'e' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/form/Form.d.ts
(48,30): error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/date-picker/index.d.ts
(11,29): error TS7006: Parameter 'trigger' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts
(7,19): error TS7006: Parameter 'route' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts
(7,26): error TS7006: Parameter 'params' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts
(7,34): error TS7006: Parameter 'routes' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts
(7,42): error TS7006: Parameter 'paths' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/back-top/index.d.ts
(4,16): error TS7006: Parameter 'event' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/alert/index.d.ts
(16,16): error TS7006: Parameter 'event' implicitly has an 'any' type.
ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/auto-complete/index.d.ts
(24,17): error TS7006: Parameter 'value' implicitly has an 'any' type.
BTW, the four apis are missing in the d.ts file of notification component of antd 2.0.1 when migrated from antd 1.11.x to 2.0.1:
notification.success(config)
notification.error(config)
notification.info(config)
notification.warn(config)
可重现的在线演示
无.
The text was updated successfully, but these errors were encountered: