You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SwipeProvider breaks on type checking, all the component becomes red and types are not compatible.
Error message is below ( copied from VS code ).
Temporary fix is putting /* @ts-ignore */ above the component
No overload matches this call.
Overload 1 of 2, '(props: SwipeProviderProps | Readonly): SwipeProvider', gave the following error.
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
Overload 2 of 2, '(props: SwipeProviderProps, context: any): SwipeProvider', gave the following error.
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.ts(2769)
The text was updated successfully, but these errors were encountered:
it same my error
I have to fix
./node_modules/react-native-swipe-item/index.d.tsx
to add some code
declare module 'react-native-swipe-item' {
..
interface SwipeProviderProps {
/**
* Swipe items mode, default is single
*/
mode?: 'single' | 'multiple';
/**
* The trigger for automatically closed swipe item , default is onItemMoved
* `onItemMoved` - when the swipe item is moved, the opened one will be closed.
* `onButtonShowed` - when the swipe item button is showing, the opened one will be closed.
*/
closeTrigger?: 'onItemMoved' | 'onButtonShowed';
children: Element; //add code fix error
}
SwipeProvider breaks on type checking, all the component becomes red and types are not compatible.
Error message is below ( copied from VS code ).
Temporary fix is putting /* @ts-ignore */ above the component
No overload matches this call.
Overload 1 of 2, '(props: SwipeProviderProps | Readonly): SwipeProvider', gave the following error.
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
Overload 2 of 2, '(props: SwipeProviderProps, context: any): SwipeProvider', gave the following error.
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.ts(2769)
The text was updated successfully, but these errors were encountered: