-
-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
rewrite in typescript #1846
Comments
Is this going to happen? (I think it would be great!) |
affix ok |
Add https://github.com/buzinas/tslint-eslint-rules for missing eslint rules like object-curly-spacing |
Maybe i can do something about this topic. but don't know your plan yet. |
@BANG88 move types in index.d.ts to components , see affix, welcome pr |
Assigned and updated |
@BANG88 @waywardmonkeys Maybe you guys can help to rewrite some components which are assigned to you above. (If you want to 🎅 ) |
@afc163 OK.can we have a develop instruction? how to rewrite it using ts,and how to test it. |
Develop instruction: https://github.com/ant-design/ant-design/wiki/Development#local-development And rewrite instruction in top floor: #1846 (comment) We don't support developing in windows right now. 😢 You could help us improve that too. |
I add some typings for |
是这样改的么?总感觉哪里不对的样子 |
after modification, use vs code to open project and check |
我也可以帮忙用typescript重写一部分组件,如果需要的话。 |
??ts????????? ???? iPhone ? 2016?6?26??13:07?Gray Choi <notifications@github.commailto:notifications@github.com> ??? ???????typescript??????????????? You are receiving this because you are subscribed to this thread. |
赞! |
我也可以帮忙,如果有需要的话。 |
@afc163 看到了,最近很少关注antd的动态。 |
i use typescript a long time, i can help |
我也可以帮忙用 TypeScript 改写一部分组件,如果需要的话。 |
看来大家都是对写代码感兴趣,不喜欢写文档 😂 |
@benjycui 我可以帮忙更新文档 如果需要的话 |
@wenxiongid if you have no time, I am going to finish your tasks, OK? |
@benjycui OK, sorry for my busy job these days |
omg...looks like it's going to happen :) |
Updated. |
WIP |
@afc163 ?? |
Look at #1846 (comment) |
很想知道为啥要换TypeScript呢? |
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 ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/select/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/select/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/icon/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/form/Form.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/date-picker/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/back-top/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/alert/index.d.ts ERROR in /home/vagrant/apps/r0/node_modules/antd/lib/auto-complete/index.d.ts |
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) |
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. |
@ALL
https://www.typescriptlang.org/docs/handbook/basic-types.html
demo: https://github.com/ant-design/ant-design/blob/master/components/affix/index.tsx
recommended IDE: visual studio code / idea
steps
env
move types in index.d.ts to components/xx/index.tsx
change react import
to
add reference to components/index.tsx
npm run ts-lint
delete index.d.ts
change index.js to
components
npm run lint
)This will close #973
The text was updated successfully, but these errors were encountered: