Skip to content

Commit 6e75d66

Browse files
authored
Fix TS config & TS errors in Example (#1580)
1 parent 1c938b1 commit 6e75d66

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/Example/src/multitap/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { LoremIpsum } from '../common';
1414

1515
interface PressBoxProps {
16-
setDuration: (duration: number) => void;
16+
setDuration?: (duration: number) => void;
1717
}
1818

1919
interface ExampleState {
@@ -24,7 +24,7 @@ export class PressBox extends Component<PressBoxProps> {
2424
private onHandlerStateChange = (
2525
event: LongPressGestureHandlerStateChangeEvent
2626
) => {
27-
this.props.setDuration(event.nativeEvent.duration);
27+
this.props.setDuration?.(event.nativeEvent.duration);
2828
};
2929
private onSingleTap = (event: TapGestureHandlerStateChangeEvent) => {
3030
if (event.nativeEvent.state === State.ACTIVE) {

examples/Example/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4+
"noEmit": true,
45
"baseUrl": ".",
56
"paths": {
67
"react-native-gesture-handler": ["../../src/index.ts"],

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"target": "esnext",
1414
"declaration": true,
1515
"declarationMap": false,
16+
"outDir": "lib/typescript",
1617

1718
"noStrictGenericChecks": false,
1819
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)