Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l authored Oct 26, 2018
1 parent bfb2c48 commit 2415909
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export default function useOnlineStatus(): boolean;
export default function useOnlineStatus(opts: {
onOnline?: () => void,
onOffline?: () => void,
onStatusChange?: (online: boolean) => void,
}): boolean;

This comment has been minimized.

Copy link
@resir014

resir014 Oct 26, 2018

This can be extracted into a separate type:

interface OnlineStatusOpts {
    onOnline?: () => void,
    onOffline?: () => void,
    onStatusChange?: (online: boolean) => void,
}

export default function useOnlineStatus(opts: OnlineStatusOpts): boolean;

0 comments on commit 2415909

Please sign in to comment.