Fix types
This commit is contained in:
parent
004160b664
commit
81771f511c
5 changed files with 8 additions and 6 deletions
|
|
@ -34,7 +34,7 @@ function isIOS() {
|
|||
|
||||
export function usePageUnload(callback: () => void) {
|
||||
useEffect(() => {
|
||||
let pageVisibilityTimeout: number;
|
||||
let pageVisibilityTimeout: ReturnType<typeof setTimeout>;
|
||||
|
||||
function onBeforeUnload(event: PageTransitionEvent) {
|
||||
if (event.type === "visibilitychange") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue