chore: add window.addCleanup() for cleaning up handlers

This commit is contained in:
Jacky Zhao 2024-02-01 20:07:14 -08:00
parent 8a6ebd1939
commit c00089bd57
12 changed files with 47 additions and 49 deletions

1
globals.d.ts vendored
View file

@ -8,5 +8,6 @@ export declare global {
}
interface Window {
spaNavigate(url: URL, isBack: boolean = false)
addCleanup(fn: (...args: any[]) => void)
}
}