Jump to content
Search Community

Pim de Wit

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Pim de Wit

  1. Hi, I am using TypeScript with React and GSAP. Is there a way to correctly type event callbacks that are wrapped with `contextSafe`? const onPointerMove = contextSafe((event: React.PointerEvent) => {}); ... // TS2322: Type Function is not assignable to type PointerEventHandler<HTMLDivElement> <div onPointerMove={onPointerMove}/> Here is a demo: https://codepen.io/pimdewit/pen/eYXgXXY
×
×
  • Create New...