Missing types in useWheel hook
michelecocuccio opened this issue · comments
Hello! Thanks for the awesome library!
I have noticed that the properties last
and memo
are not typed correctly in the useWheel
hook. I have followed the example provided to use wheel with Lethargy but when this is used with Typescript it throws an error as the properties last
and memo
that are contained in the SharedGestureState
are omitted I guess.
Property 'last' does not exist on type 'Omit<SharedGestureState & CommonGestureState & { axis: "x" | "y" | undefined; xy: Vector2; } & { event: WheelEvent; }, "event"> & { ...; }'ts(2339)
Property 'memo' does not exist on type 'Omit<SharedGestureState & CommonGestureState & { axis: "x" | "y" | undefined; xy: Vector2; } & { event: WheelEvent; }, "event"> & { ...; }'.ts(2339)
Information:
- Use Gesture version: 10.2.17
Checklist:
- I've read the documentation.
- If this is an issue with drag, I've tried setting
touch-action: none
to the draggable element.
There are other closed issues about a similar problem. It's likely to be your local typescript config.
I'll reopen if you're able to submit a repro sandbox on Codesandbox.