svelte-dnd-action 0.9.19 → 0.9.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -235,13 +235,15 @@ setDebugMode(true);
235
235
  If you are using Typescript, you will need to add the following block to your `global.d.ts` (at least until [this svelte issue](https://github.com/sveltejs/language-tools/issues/431) is resolved):
236
236
 
237
237
  ```typescript
238
- declare type DndEvent = import("svelte-dnd-action").DndEvent;
238
+ declare type Item = import('svelte-dnd-action').Item;
239
+ declare type DndEvent<ItemType = Item> = import('svelte-dnd-action').DndEvent<ItemType>;
239
240
  declare namespace svelte.JSX {
240
- interface HTMLAttributes<T> {
241
- onconsider?: (event: CustomEvent<DndEvent> & {target: EventTarget & T}) => void;
242
- onfinalize?: (event: CustomEvent<DndEvent> & {target: EventTarget & T}) => void;
243
- }
241
+ interface HTMLAttributes<T> {
242
+ onconsider?: (event: CustomEvent<DndEvent<ItemType>> & { target: EventTarget & T }) => void;
243
+ onfinalize?: (event: CustomEvent<DndEvent<ItemType>> & { target: EventTarget & T }) => void;
244
+ }
244
245
  }
246
+
245
247
  ```
246
248
 
247
249
  You may need to edit `tsconfig.json` to include `global.d.ts` if it doesn't already: "include": ["src/**/*", "global.d.ts"].