Type error: Interface 'TreeSelectProps' incorrectly extends interface 'AbstractSelectProps'.
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
Add the newest version of yarn to a typescript project and import any of the components (Layout in my case)
What is expected?
App should compile
What is actually happening?
The following TypeScript error is throw:
Type error: Interface 'TreeSelectProps' incorrectly extends interface 'AbstractSelectProps'.
Types of property 'getPopupContainer' are incompatible.
Type '((triggerNode: Element) => HTMLElement) | undefined' is not assignable to type '((triggerNode?: Element | undefined) => HTMLElement) | undefined'.
Type '(triggerNode: Element) => HTMLElement' is not assignable to type '(triggerNode?: Element | undefined) => HTMLElement'.
Types of parameters 'triggerNode' and 'triggerNode' are incompatible.
Type 'Element | undefined' is not assignable to type 'Element'.
Type 'undefined' is not assignable to type 'Element'. TS2430
24 | rootPId?: string;
25 | }
> 26 | export interface TreeSelectProps extends AbstractSelectProps {
| ^
27 | autoFocus?: boolean;
28 | defaultValue?: string | number | Array<any>;
29 | dropdownStyle?: React.CSSProperties;
Environment | Info |
---|---|
antd | 3.12.4 |
React | 16.7.0 |
System | Ubuntu 18.10 |
Browser | Chrome |
Downgrading to antd version 3.11 resolves the issue
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Antd, `tsc` get error: Interface 'TreeProps<T>' incorrectly ...
node_modules/antd/lib/tree-select/index.d.ts:18:18 - error TS2430: Interface 'TreeSelectProps<ValueType, OptionType>' incorrectly extends ...
Read more >Typescript errors with KendoReact like error TS2430: Interface ...
ts:12:18 - error TS2430: Interface 'GridColumnProps' incorrectly extends interface 'ColumnBaseProps'. Types of property 'cell' are incompatible.
Read more >How to Easily Extend Interfaces in TypeScript - Webtips
Learn how you can extend your interfaces in TypeScript with other ... error: // Interface 'Employee' incorrectly extends interface 'Person'.
Read more >DefinitelyTyped/DefinitelyTyped - Gitter
node_modules/@types/jasmine/ts3.1/index.d.ts:619:15 - error TS2430: Interface 'FunctionMatchers<Fn>' incorrectly extends interface 'Matchers<any>'. Types of ...
Read more >TypeScript errors and how to fix them
You need to assign your type declaration using the = character: ... error TS2430: Interface ' StockExchange ' incorrectly extends interface ' Exchange...
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 Free
Top 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
Can confirm this version works:
"antd": "^3.9.3 <3.12.4 || ^3.12.5",
Looks like it’s fixed by https://github.com/ant-design/ant-design/pull/14443