First of all, thanks for forking/maintaining this beautiful library! 💪
It's been a while since I use it in my project. Recently I've needed to switch from react-beautiful-dnd (v13.0.0) to @hello-pangea/dnd (v16.2.0) due to upgrading to react v18. As soon as my project is written with typescript, I'm now facing some typing/import issues.
Expected behavior
I have SensorAPI widely used with typescript, so I've used to import FluidDragActions and Position directly from react-beautiful-dnd, as described in original documentation:
https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/sensors/sensor-api.md#controlling-a-drag-pre-drag-predragaction
So I was expecting to simply switch my import from this:
import {FluidDragActions, Position, SensorAPI} from "react-beautiful-dnd"
to this:
import {FluidDragActions, Position, SensorAPI} from "@hello-pangea/dnd"
Actual behavior
I have this issues while building the project, as some types are not exported anymore, while SensorAPI is still good:
TS2459: Module '"@hello-pangea/dnd"' declares 'FluidDragActions' locally, but it is not exported.
TS2459: Module '"@hello-pangea/dnd"' declares 'Position' locally, but it is not exported.
I couldn't find any mentions of changing imports in forked documentation:
https://github.com/hello-pangea/dnd/blob/main/docs/sensors/sensor-api.md#controlling-a-drag-pre-drag-predragaction
Steps to reproduce
Obviously: try to import some types needed for sensors, as described in documentation
Suggested solution?
I'm not familiar with building typings for npm, but I could guess there might be some issue with generating declarations here:
|
output: [{ file: 'dist/dnd.d.ts', format: 'es' }], |
or with exporting types here:
|
export interface FluidDragActions extends DragActions { |
What version of React are you using?
v18.2.0
What version of @hello-pangea/dnd are you running?
v16.2.0
First of all, thanks for forking/maintaining this beautiful library! 💪
It's been a while since I use it in my project. Recently I've needed to switch from
react-beautiful-dnd(v13.0.0) to@hello-pangea/dnd(v16.2.0) due to upgrading to react v18. As soon as my project is written with typescript, I'm now facing some typing/import issues.Expected behavior
I have
SensorAPIwidely used with typescript, so I've used to importFluidDragActionsandPositiondirectly fromreact-beautiful-dnd, as described in original documentation:https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/sensors/sensor-api.md#controlling-a-drag-pre-drag-predragaction
So I was expecting to simply switch my import from this:
to this:
Actual behavior
I have this issues while building the project, as some types are not exported anymore, while
SensorAPIis still good:I couldn't find any mentions of changing imports in forked documentation:
https://github.com/hello-pangea/dnd/blob/main/docs/sensors/sensor-api.md#controlling-a-drag-pre-drag-predragaction
Steps to reproduce
Obviously: try to import some types needed for sensors, as described in documentation
Suggested solution?
I'm not familiar with building typings for npm, but I could guess there might be some issue with generating declarations here:
dnd/rollup.config.mjs
Line 124 in 8242844
or with exporting types here:
dnd/src/types.ts
Line 454 in 02daac9
What version of
Reactare you using?v18.2.0What version of
@hello-pangea/dndare you running?v16.2.0