types(@vant/use): useEventListener target ref can be undefined

This commit is contained in:
chenjiahan
2020-10-09 20:39:11 +08:00
parent 86e58ef440
commit f2bedef285
4 changed files with 12 additions and 6 deletions
@@ -23,7 +23,7 @@ if (inBrowser) {
}
export type UseEventListenerOptions = {
target?: EventTarget | Ref<EventTarget>;
target?: EventTarget | Ref<EventTarget | undefined>;
capture?: boolean;
passive?: boolean;
};