diff --git a/components/lib/hooks/Hooks.d.ts b/components/lib/hooks/Hooks.d.ts index 235782a321..3ccf79bdc3 100644 --- a/components/lib/hooks/Hooks.d.ts +++ b/components/lib/hooks/Hooks.d.ts @@ -3,7 +3,24 @@ import * as React from 'react'; export type TargetType = 'document' | 'window' | React.Ref | undefined; export type StorageType = 'local' | 'session'; +interface EventOptions { + target?: TargetType; + type?: string; + listener?(event: Event): void; + options?: any; + when?: boolean; +} +interface OverlayEventOptions { + target?: TargetType; + overlay?: TargetType; + listener?(event: Event, type?: string): void; + when?: boolean; +} + +interface ResizeEventOptions { + listener?(event: Event): void; +} export declare function usePrevious(value: any): any; export declare function useMountEffect(effect: React.EffectCallback): void; @@ -15,4 +32,4 @@ export declare function useOverlayScrollListener(options: EventOptions): any[]; export declare function useResizeListener(options: ResizeEventOptions): any[]; export declare function useInterval(fn: any, delay?: number, when?: boolean): any[]; export declare function useTimeout(fn: any, delay?: number, when?: boolean): any[]; -export declare function useStorage(initialValue: S, key: string, storage?: StorageType): [S, React.Dispatch>]; \ No newline at end of file +export declare function useStorage(initialValue: S, key: string, storage?: StorageType): [S, React.Dispatch>]; diff --git a/components/lib/hooks/useStorage.js b/components/lib/hooks/useStorage.js index 6b9c58780d..231452e931 100644 --- a/components/lib/hooks/useStorage.js +++ b/components/lib/hooks/useStorage.js @@ -48,4 +48,4 @@ export const useStorage = (initialValue, key, storage = 'local') => { return [storedValue, setValue]; } -/* eslint-enable */ +/* eslint-enable */ \ No newline at end of file