1 | interface EventTarget<U> {
|
2 | target: {
|
3 | value: U;
|
4 | };
|
5 | }
|
6 | export interface Options<T, U> {
|
7 | initialValue?: T;
|
8 | transformer?: (value: U) => T;
|
9 | }
|
10 | declare function useEventTarget<T, U = T>(options?: Options<T, U>): readonly [T | undefined, {
|
11 | readonly onChange: (e: EventTarget<U>) => void;
|
12 | readonly reset: () => void;
|
13 | }];
|
14 | export default useEventTarget;
|