Skip to content

Commit 80da961

Browse files
committed
fix touchable example typescript errors
1 parent 15070f9 commit 80da961

File tree

1 file changed

+3
-1
lines changed
  • example/src/release_tests/touchables

1 file changed

+3
-1
lines changed

example/src/release_tests/touchables/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Touchables = {
5555
color?: string;
5656
renderChild: (() => null) | ((color?: string) => React.ReactNode);
5757
text: string;
58-
background?: (A: typeof TouchableNativeFeedback) => BackgroundPropType;
58+
background?: (A: typeof RNTouchableNativeFeedback) => BackgroundPropType;
5959
};
6060

6161
const TOUCHABLES: Touchables[] = [
@@ -378,6 +378,8 @@ export class TouchableExample extends Component<
378378
</RNTouchable>
379379
<GHTouchable
380380
{...props}
381+
// @ts-ignore TouchableNativeFeedback is a FC without explicitly declared static functions
382+
// despite this, it forwards all the static functions of RNTouchableNativeFeedback
381383
background={background?.(TouchableNativeFeedback)}>
382384
{renderChild(color)}
383385
</GHTouchable>

0 commit comments

Comments
 (0)