@crossed/sheet
Version:
A Cross Platform(Android & iOS) ActionSheet with a robust and flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
27 lines • 850 B
TypeScript
/**
* Copyright (c) Paymium.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root of this projects source tree.
*/
export type EventHandler = (..._args: any[]) => void;
export type EventHandlerSubscription = {
unsubscribe: () => void;
};
declare class EventManager {
_registry: Map<EventHandler, {
name: string;
once: boolean;
}>;
constructor();
unsubscribeAll(): void;
subscribe(name: string, handler: EventHandler, once?: boolean): {
unsubscribe: () => boolean;
};
unsubscribe(_name: string, handler: EventHandler): boolean;
publish(name: string, ...args: any[]): void;
remove(...names: string[]): void;
}
export default EventManager;
export declare const actionSheetEventManager: EventManager;
//# sourceMappingURL=eventmanager.d.ts.map