Closed lewismazzei closed 2 years ago
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch react-split-pane@0.1.92 for the project I'm working on.
react-split-pane@0.1.92
I got the following error in my IDE and when running npm run build:
npm run build
Type error: Type '{ children: Element[]; split: "vertical"; minSize: number; defaultSize: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & Pick<Readonly<SplitPaneProps>, never> & InexactPartial<...> & InexactPartial<...>'. 7 | const Home: NextPage = () => { 8 | return ( > 9 | <SplitPane split='vertical' minSize={50} defaultSize={100}> | ^ 10 | <div /> 11 | <div /> 12 | </SplitPane>
Here is the diff that solved my problem:
diff --git a/node_modules/react-split-pane/index.d.ts b/node_modules/react-split-pane/index.d.ts index d116f54..5701a2c 100644 --- a/node_modules/react-split-pane/index.d.ts +++ b/node_modules/react-split-pane/index.d.ts @@ -5,6 +5,7 @@ export type Size = string | number; export type Split = 'vertical' | 'horizontal'; export type SplitPaneProps = { + children: React.ReactElement[], allowResize?: boolean; className?: string; primary?: 'first' | 'second';
This issue body was partially generated by patch-package.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-split-pane@0.1.92
for the project I'm working on.I got the following error in my IDE and when running
npm run build
:Here is the diff that solved my problem:
This issue body was partially generated by patch-package.