Not able to use ANTD with latest typescript react definitions.
See original GitHub issueSorry English speaker,
Trying to get a working up to date version of antd setup with the rest of my project. npm install -D antd @types\react @types\react-dom
gives a host of errors. Narrowed down to mostly updates in the .d.ts. It appears the latest react type definitions added generics to things such as MouseEvent (now MouseEvent<T>). I added the <T>
changes locally but not familiar enough with codebase to know if this causes break changes for more than a simple hello world app.
Also its looking for a module rc-select
, had to npm i -D @types/rc-select
to remove that issue as well.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Use in TypeScript - Ant Design
Let's create a TypeScript project by using create-react-app , then import antd step by step. We build antd based on latest stable version...
Read more >Typescript compile error with latest antd - Stack Overflow
Running npm tsc with the latest antd version returns several errors. ... if it's a react project why you use npm tsc ?...
Read more >Typescript error · Issue #16805 · ant-design/ant-design - GitHub
No error. What is actually happening? node_modules/antd/lib/mentions/index.d.ts:25:51 - error TS2307: ...
Read more >How to Set up Create React App with TypeScript, Ant Design ...
npx create-react-app new-project-dir-name --template typescript ... Note that antd already comes with type definitions, so there's no need ...
Read more >Creact-React-App+TypeScript+Less+Antd+Theming - Medium
The only thing we cannot overcome this way is the ability to overwrite other parts of AntD design defined outside of the default.less...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, looks like exactly the same issue. Will close so other takes precedence. Sorry for the duplicate issue.
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.