Skip to content

Commit 0c54818

Browse files
authored
Fix Timeout type (#1386)
ReturnType<typeof setTimeout> should resolve to either RN or NodeJS version, depending on what project includes.
1 parent 791b222 commit 0c54818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/touchables/GenericTouchable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface InternalProps {
5757

5858
// TODO: maybe can be better
5959
// TODO: all clearTimeout have ! added, maybe they shouldn't ?
60-
type Timeout = null | NodeJS.Timeout | undefined;
60+
type Timeout = ReturnType<typeof setTimeout> | null | undefined;
6161

6262
/**
6363
* GenericTouchable is not intented to be used as it is.

0 commit comments

Comments
 (0)