Enhancements
useManager
- Advanced type inference with action params
prev
[P in keyof T['actions']]: T['actions'][P] extends WritableAtom<
any,
infer U,
void
>
? (param: U[0]) => void
: never;
changed
[P in keyof T['actions']]: T['actions'][P] extends WritableAtom<
any,
infer U,
void
>
? U[0] extends undefined
? () => void
: (param: U[0]) => void
: never;