Data typing
Hi, I'm using dnd-kit in a TypeScript project, and would like to strongly type the data property attached to Draggable objects.
I tried extending the interface, the way other libraries sometimes implement it, but it didn't work.
declare module '@dnd-kit/core/dist/store/types' {
export interface Active {
data: DataRef<MyDataType>;
}
}
TypeScript gives an error Subsequent property declarations must have the same type. Property 'data' must be of type 'DataRef<AnyData>', but here has type 'DataRef<MyDataType>'.
It would be great if a future version could expose an API for either extending the interface, or at passing generics to the DnDContext component.
Why is no one talking about this???
Hi @Scimonster sorry to hijack this thread. Can you comment on this Utif.js discussion regarding granting publish rights on the utif-js non-official package to the original author of the library, @photopea or other interested developers?
In the meantime, @jardicc published utifjs2, which is the state of the package 2 years back while yours is 6 years old. It will soon have more momentum than yours (770k weekly dls vs 870k), clearly it would be great to have the utifjs npm package be somehow officially maintained.