Closed Mnigos closed 2 months ago
Making DropResult a generic type to specify type of droppableId
DropResult
droppableId
Right now I have to assert the type.
async function onDragEng({ source, destination, draggableId }: DropResult) { if (!destination) return if (destination.droppableId === source.droppableId) { reorderTasks( source.droppableId as BoardKey, source.index, destination.index ) } }
I would like to specify type for droppableId in DropResult type argument
async function onDragEng({ source, destination, draggableId }: DropResult<BoardKey>) { if (!destination) return if (destination.droppableId === source.droppableId) { reorderTasks( source.droppableId, source.index, destination.index ) } }
Description
Making
DropResult
a generic type to specify type ofdroppableId
Right now I have to assert the type.
I would like to specify type for
droppableId
in DropResult type argument