@iminside/react-yandex-maps
Version:
Yandex.Maps API bindings for React
48 lines (47 loc) • 1.29 kB
TypeScript
/**
* Separates YMaps events from other component props based on prop name
*
* @param {Object} props Component props
* @returns {Object} Separated _event props and other component props
*/
export declare function separateEvents(props: any): {
_events: {};
};
/**
* Adds event to YMaps object
*
* @param {Object} instance YMaps object instance
* @param {string} eventName Event name (e.g., "onclick", "ontouchstart")
* @param {Function} handler Event handler method
*/
export declare function addEvent(
instance: any,
eventName: any,
handler: any
): void;
/**
* Removes event from YMaps object
*
* @param {Object} instance YMaps object instance
* @param {string} eventName Event name (e.g., "onclick", "ontouchstart")
* @param {Function} handler Event handler method
*/
export declare function removeEvent(
instance: any,
eventName: any,
handler: any
): void;
/**
* Given two objects with new and old events, checks if event was
* changed and updates it by removing the old one and adding the
* new one
*
* @param {Object} instance YMaps object instance
* @param {Object} oldEvents Map of old events
* @param {Object} newEvents Map of new events
*/
export declare function updateEvents(
instance: any,
oldEvents: any,
newEvents: any
): void;