Skip to content

Commit

Permalink
tree dnd todos, microsoft#32592
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken authored and Geoffrey committed Nov 30, 2021
1 parent 8edfdce commit f27723e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vscode-dts/vscode.proposed.treeViewDragAndDrop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ declare module 'vscode' {
/**
* Provides support for drag and drop in `TreeView`.
*/
// TODO@api why disposable?
export interface DragAndDropController<T> extends Disposable {

/**
Expand All @@ -96,6 +97,7 @@ declare module 'vscode' {
*
* @param source The source items for the drag and drop operation.
*/
// TODO@api I think this can be more generic, tho still constraint, e.g have something that works everywhere within VS Code
onWillDrop?(source: T[]): Thenable<TreeDataTransfer>;

/**
Expand All @@ -106,6 +108,7 @@ declare module 'vscode' {
* @param source The data transfer items of the source of the drag.
* @param target The target tree element that the drop is occuring on.
*/
// TODO@api NIT - allow to return `Thenable<void> | void`
onDrop(source: TreeDataTransfer, target: T): Thenable<void>;
}
}

0 comments on commit f27723e

Please sign in to comment.