Skip to content

Commit 3f134b8

Browse files
author
AndreaPerizzato
committed
Added typescript definitions
1 parent f9b5f20 commit 3f134b8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dist/index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
declare module "react-native-appstate-hook" {
2+
import { AppStateStatus } from "react-native";
3+
4+
export interface AppStateHookSettings {
5+
onChange?: (status: AppStateStatus) => void;
6+
onForeground?: () => void;
7+
onBackground?: () => void;
8+
}
9+
10+
export interface AppStateHookResult {
11+
appState: AppStateStatus;
12+
}
13+
14+
function useAppState(settings?: AppStateHookSettings): AppStateHookResult;
15+
16+
export default useAppState;
17+
}

0 commit comments

Comments
 (0)