react-split 2.0.13 Typescript "extends" incompatible
See original GitHub issueIn react-split’s SplitProps interface you removed className?: string in favour of extending from React.HTMLAttributes<HTMLDivElement>.
(see https://github.com/nathancahill/split/issues/689 and https://github.com/nathancahill/split/commit/e18c3a07dc607725c708b2c476dff52f9b515142)
The problem is, that some types in SplitProps have the same names as in @types/react’s React.HTMLAttributes<HTMLDivElement> but different definitions, like onDrag
SplitProps: onDrag?: Options["onDrag"]
DOMAttributes (which HTMLAttributes extends from): onDrag?: DragEventHandler<T> | undefined;
And that can generate errors like this:
Interface 'SplitProps' incorrectly extends interface 'HTMLAttributes<HTMLDivElement>'.
Types of property 'onDrag' are incompatible.
Type '((sizes: number[]) => void) | undefined' is not assignable to type 'DragEventHandler<HTMLDivElement> | undefined'.
Type '(sizes: number[]) => void' is not assignable to type 'DragEventHandler<HTMLDivElement>'.
Types of parameters 'sizes' and 'event' are incompatible.
Type 'DragEvent<HTMLDivElement>' is missing the following properties from type 'number[]': length, pop, push, concat, and 28 more.
export interface SplitProps extends React.HTMLAttributes<HTMLDivElement> {
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Split.js - Bountysource
Hi @nathancahill I have a 3 div setup. If for example I'm increasing the right div, I want the mid div to move...
Read more >React TypeScript: Types of property 'X' are incompatible. Type ...
I am working on React-TypeScript app, creating credit card number imput ... export default class CardNumber extends Component<IProps,IState > ...
Read more >react-split - npm
The <Split /> component wraps multiple children components to create a resizeable split view. The component is a light wrapper around the Split....
Read more >React-universal-component - npm.io
DEFINITION: "Universal Rendering" is simultaneous SSR + Splitting, not trading one for the other. Gone are the days of holding onto file hashes,...
Read more >Release notes - Riot.js
Fix textarea inconsistent updates on IE riot#1959 ... Fix mixins using child class functions ( class Child extends Parent {} ) riot#1857 ...
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

Sorry yes, just published as v2.0.14.
@nathancahill Anything needed to get this published? Thanks!