UNPKG
etc-hooks
Version:
beta (0.1.0)
latest (0.5.3)
0.5.3
0.5.2
0.5.1
0.5.0
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.0
0.2.0
0.1.1
0.1.0
Etcetera React 业务 Hooks
github.com/AmbitionsXXXV/etc-hooks
AmbitionsXXXV/etc-hooks
etc-hooks
/
es
/
useWindowEvent
/
index.d.ts
2 lines
(1 loc)
•
250 B
TypeScript
View Raw
1
2
export
default
function
useWindowEvent<K
extends
string>(
type
: K,
listener
: K
extends
keyof
WindowEventMap
?
(
this
: Window, ev: WindowEventMap[K]
) =>
void
:
(
this
: Window, ev: CustomEvent
) =>
void
, options?: boolean |
AddEventListenerOptions
):
void
;