Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions lib/fileListAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,20 @@ interface FileListActionData {
order: number

/**
* Returns true if this action shoud be shown
*
* Condition whether this action is shown or not
* @param view The current view
* @param nodes The nodes in the current directory
* @param folder The current folder
*/
enabled?: (view: View, nodes: Node[], folder: Folder) => boolean

/**
* Function to execute
*
* @param view The current view
* @param nodes The nodes in the current directory
* @param folder The current folder
* Function executed on single file action
* @return true if the action was executed successfully,
* false otherwise and null if the action is silent/undefined.
* @throws Error if the action failed
*/
exec: (view: View, nodes: Node[], folder: Folder) => Promise<void>
exec: (view: View, nodes: Node[], folder: Folder) => Promise<boolean|null>,
}

export class FileListAction {
Expand Down
Loading