mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
types: improve event target typing
This commit is contained in:
@@ -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
|
||||||
) {
|
) {
|
||||||
|
Reference in New Issue
Block a user