import { CreateViewEventData, EventData, GestureEventData, Placeholder, ScrollEventData, ScrollView, ShownModallyData, View } from '@nativescript/core'; import { ViewRef } from '../types'; type ViewEventData = Omit & { object: T; }; type ViewGestureEventData = Omit & { object: T; }; type ViewShownModallyData = Omit & { object: T; }; type ViewScrollEventData = Omit & { object: T; }; type CreatingViewEventData = Omit & { object: Placeholder; }; interface Event { loaded?: (eventData: ViewEventData) => void; unloaded?: (eventData: ViewEventData) => void; layoutChanged?: (eventData: ViewEventData) => void; tap?: (eventData: ViewGestureEventData) => void; doubleTap?: (eventData: ViewGestureEventData) => void; pinch?: (eventData: ViewGestureEventData) => void; pan?: (eventData: ViewGestureEventData) => void; swipe?: (eventData: ViewGestureEventData) => void; rotation?: (eventData: ViewGestureEventData) => void; longPress?: (eventData: ViewGestureEventData) => void; touch?: (eventData: ViewGestureEventData) => void; showingModally?: (eventData: ViewShownModallyData) => void; shownModally?: (eventData: ViewShownModallyData) => void; accessibilityBlur?: (eventData: ViewEventData) => void; accessibilityFocus?: (eventData: ViewEventData) => void; accessibilityFocusChanged?: (eventData: ViewEventData) => void; accessibilityPerformEscape?: (eventData: ViewEventData) => void; scroll?: (eventData: ViewScrollEventData) => void; creatingView?: (eventData: CreatingViewEventData) => void; } /** * Register using view.on on mounted, and view.off automatically on unmounted. * * * @param target * @param events */ export declare function useEventListener(target: T | ViewRef, events: Event): { cleanup: () => void; }; export {};