mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 18:00:27 +08:00
types: improve event target typing
This commit is contained in:
parent
2eb680723d
commit
6d4efa183e
@ -20,7 +20,7 @@ if (!isServer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function on(
|
export function on(
|
||||||
target: HTMLElement | Document | Window,
|
target: EventTarget,
|
||||||
event: string,
|
event: string,
|
||||||
handler: EventHandler,
|
handler: EventHandler,
|
||||||
passive = false
|
passive = false
|
||||||
@ -35,7 +35,7 @@ export function on(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function off(
|
export function off(
|
||||||
target: HTMLElement | Document | Window,
|
target: EventTarget,
|
||||||
event: string,
|
event: string,
|
||||||
handler: EventHandler
|
handler: EventHandler
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user