react-native-walkthrough-tooltip
react-native-walkthrough-tooltip copied to clipboard
Patch for ChildrenWithProps
trafficstars
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-walkthrough-tooltip/src/tooltip.d.ts b/node_modules/react-native-walkthrough-tooltip/src/tooltip.d.ts
index 5a7ef59..bd497f9 100644
--- a/node_modules/react-native-walkthrough-tooltip/src/tooltip.d.ts
+++ b/node_modules/react-native-walkthrough-tooltip/src/tooltip.d.ts
@@ -2,7 +2,7 @@
// Original definitions by: Siraj Alam https://github.com/sirajalam049
declare module 'react-native-walkthrough-tooltip' {
- import React from 'react';
+ import React, { PropsWithChildren } from 'react';
import { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
type Orientation =
@@ -166,7 +166,7 @@ declare module 'react-native-walkthrough-tooltip' {
</Tooltip>
```
*/
- class Tooltip extends React.Component<TooltipProps> {}
+ class Tooltip extends React.Component<PropsWithChildren<TooltipProps>> {}
export default Tooltip;
}
This issue body was partially generated by patch-package.
Hi, it looks not working to me using patch-package, i got the following error from running patch-package command, have you an idea to solve it ?
❯ yarn patch-package --use-yarn react-native-walkthrough-tooltip
yarn run v1.22.19
$ /Users/*****/Documents/Dev/Marelis/marelis-quality-form/node_modules/.bin/patch-package --use-yarn react-native-walkthrough-tooltip
patch-package 6.5.0
• Creating temporary folder
• Installing [email protected] with yarn
• Diffing your files with clean files
⁉️ Not creating patch file for package 'react-native-walkthrough-tooltip'
⁉️ There don't appear to be any changes.
I get this warning while using with typescript:
No overload matches this call.
Overload 1 of 2, '(props: TooltipProps | Readonly<TooltipProps>): Tooltip', gave the following error.
Type '{ children: Element; isVisible: boolean; content: Element; onClose: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Overload 2 of 2, '(props: TooltipProps, context: any): Tooltip', gave the following error.
Type '{ children: Element; isVisible: boolean; content: Element; onClose: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Tooltip> & Readonly<TooltipProps>'
Maybe it's related to this issue.