diff --git a/packages/react-device-orientation-hook/src/index.d.ts b/packages/react-device-orientation-hook/src/index.d.ts new file mode 100644 index 0000000..54bdc68 --- /dev/null +++ b/packages/react-device-orientation-hook/src/index.d.ts @@ -0,0 +1,18 @@ +export declare type UseState = ( + initialState: T, +) => [T, (newState: T) => void]; +export declare const useState: UseState; +export declare type UseEffect = ( + didUpdate: () => (() => void) | void, + params?: any[], +) => void; +export declare const useEffect: UseEffect; +export interface IOrientationState { + angle: number; + type: string; +} +export declare const defaultState: IOrientationState; +declare const useOrientation: ( + initialState?: IOrientationState, +) => IOrientationState; +export default useOrientation; diff --git a/packages/react-notification-hook/src/index.d.ts b/packages/react-notification-hook/src/index.d.ts new file mode 100644 index 0000000..5c5fa63 --- /dev/null +++ b/packages/react-notification-hook/src/index.d.ts @@ -0,0 +1,12 @@ +export declare type UseCallback = any)>( + callback: T, + args: any[], +) => T; +export declare const useCallback: UseCallback; +export interface INotification { + options?: object; + title: string; +} +export declare const defaultValue: INotification; +declare const useNotification: (value?: INotification) => () => () => void; +export default useNotification; diff --git a/packages/react-online-status-hook/src/index.d.ts b/packages/react-online-status-hook/src/index.d.ts new file mode 100644 index 0000000..4da1e62 --- /dev/null +++ b/packages/react-online-status-hook/src/index.d.ts @@ -0,0 +1,13 @@ +export declare type UseState = ( + initialState: T, +) => [T, (newState: T) => void]; +export declare const useState: UseState; +export declare type UseEffect = ( + didUpdate: () => (() => void) | void, + params?: any[], +) => void; +export declare const useEffect: UseEffect; +export declare const useOfflineOnlineStatus: () => boolean; +export declare const useOfflineStatus: () => boolean; +export declare const useOnlineStatus: () => boolean; +export default useOfflineOnlineStatus; diff --git a/packages/react-page-visible-hook/src/index.d.ts b/packages/react-page-visible-hook/src/index.d.ts new file mode 100644 index 0000000..a6ebc08 --- /dev/null +++ b/packages/react-page-visible-hook/src/index.d.ts @@ -0,0 +1,16 @@ +export declare type UseState = ( + initialState: T, +) => [T, (newState: T) => void]; +export declare const useState: UseState; +export declare type UseEffect = ( + didUpdate: () => (() => void) | void, + params?: any[], +) => void; +export declare const useEffect: UseEffect; +export interface IPageVisibilityState { + readonly hidden: boolean; + readonly visibilityState: string; +} +export declare const initialState: IPageVisibilityState; +declare const useVisible: () => IPageVisibilityState; +export default useVisible; diff --git a/packages/react-vibration-hook/src/index.d.ts b/packages/react-vibration-hook/src/index.d.ts new file mode 100644 index 0000000..5871b36 --- /dev/null +++ b/packages/react-vibration-hook/src/index.d.ts @@ -0,0 +1,9 @@ +export declare type UseCallback = any)>( + callback: T, + args: any[], +) => T; +export declare const useCallback: UseCallback; +export declare type Vibrate = number | number[]; +export declare const defaultValue: Vibrate; +declare const useVibration: (value?: Vibrate) => () => () => void; +export default useVibration;