File "types.ts"

Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/context/event-emit/types.ts
File size: 520 bytes
MIME-type: text/plain
Charset: utf-8

export enum ACTION {
	ADD_EVENT_CALLBACK = 'add_event_callback',
	REMOVE_EVENT_CALLBACK = 'remove_event_callback',
}

export type ActionCallbackType = ( ...args: unknown[] ) => unknown;

export type ActionType = {
	type: ACTION;
	eventType: string;
	id: string;
	callback?: ActionCallbackType;
	priority?: number;
};

export type ObserverType = { priority: number; callback: ActionCallbackType };
export type ObserversType = Map< string, ObserverType >;
export type EventObserversType = Record< string, ObserversType >;