Some of the fixes are easy, like adding : Component<{ item: number }> after const Sortable or :DragEventHandler after onDragStart, but some of the others are less convenient, like currentItems.indexOf(draggable.id) failing because Id includes both strings and numbers while currentItems is more precisely typed as just numbers.
Some of the fixes are easy, like adding
: Component<{ item: number }>afterconst Sortableor:DragEventHandlerafteronDragStart, but some of the others are less convenient, likecurrentItems.indexOf(draggable.id)failing becauseIdincludes both strings and numbers whilecurrentItemsis more precisely typed as just numbers.