Skip to content

Commit c2fe09c

Browse files
authored
Merge pull request #74 from abdel-17/fix-types
Fix types
2 parents 4af232f + 7f4678f commit c2fe09c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/bitter-pears-tickle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte-file-tree": patch
3+
---
4+
5+
fix: allow destructuring `source` and `items` in drag and drop callbacks

packages/svelte-file-tree/src/lib/components/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export type ItemDragEventArgs<
9292
type: "item";
9393
input: DragInput;
9494
source: TreeItemState<TFile, TFolder>;
95+
items?: never;
9596
destination: TFolder | TTree;
9697
};
9798

@@ -102,6 +103,7 @@ export type ExternalDragEventArgs<
102103
> = {
103104
type: "external";
104105
input: DragInput;
106+
source?: never;
105107
items: Array<DataTransferItem>;
106108
destination: TFolder | TTree;
107109
};

0 commit comments

Comments
 (0)