diff --git a/package.json b/package.json index 2d0bd46..fa48392 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@observation.org/react-native-components", - "version": "1.21.0", + "version": "1.22.0", "main": "src/index.ts", "repository": "git@github.com:observation/react-native-components.git", "author": "Observation.org", diff --git a/src/hooks/useShowBlurView.ts b/src/hooks/useShowBlurView.ts index ab825b4..6015b38 100644 --- a/src/hooks/useShowBlurView.ts +++ b/src/hooks/useShowBlurView.ts @@ -6,6 +6,9 @@ import { useFocusEffect } from '@react-navigation/native' const isIOSDevice = Platform.OS === 'ios' +// Fix for TypeScript picking up the incorrect typing (node instead of react-native) for setTimeout +type Timeout = ReturnType + /** * On Android devices the BlurView should wait for all interactions to finish. * This is because it sometimes displays the wrong stack-components in the transparent background if it is displayed immediately. @@ -17,7 +20,7 @@ const useShowBlurView = () => { useFocusEffect( React.useCallback(() => { - let timer: NodeJS.Timer + let timer: Timeout const timeout = isIOSDevice ? 0 : 200 const task = InteractionManager.runAfterInteractions(() => { timer = setTimeout(() => {