1 | import type { IWorkletEventHandler, ReanimatedEvent } from './commonTypes';
|
2 |
|
3 | export type EventHandler<Event extends object, Context extends Record<string, unknown> = never> = (event: ReanimatedEvent<Event>, context?: Context) => void;
|
4 | export type EventHandlerProcessed<Event extends object, Context extends Record<string, unknown> = never> = (event: Event, context?: Context) => void;
|
5 | export type EventHandlerInternal<Event extends object> = {
|
6 | workletEventHandler: IWorkletEventHandler<Event>;
|
7 | };
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export declare function useEvent<Event extends object, Context extends Record<string, unknown> = never>(handler: EventHandler<Event, Context>, eventNames?: string[], rebuild?: boolean): EventHandlerProcessed<Event, Context>;
|
22 |
|
\ | No newline at end of file |