Skip to content

Commit

Permalink
chore(ts): add typescript definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dispix committed Oct 29, 2018
1 parent fb9bd04 commit 0269042
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export function useInterval(fn: Function, delay: number): void
export function useMount(fn: Function): void
export function usePrevious<T>(value: T): T
export function useTimeout(fn: Function, delay: number): void
export function useToggle(
initialValue: boolean,
): {
value: boolean
toggle: () => void
setValue: (value: boolean) => void
setTrue: () => void
setFalse: () => void
}
export function useUnmount(fn: Function): void
export function useUpdate(fn: Function): void

0 comments on commit 0269042

Please sign in to comment.