question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

Edit on CodeSandbox

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
aaronjameslangcommented, Jan 23, 2019

Can confirm this version works: "antd": "^3.9.3 <3.12.4 || ^3.12.5",

1reaction
sidsethupathicommented, Jan 22, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found