You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-27 23:28:38 +02:00
Tools: updated plugin types
This commit is contained in:
@ -33,7 +33,7 @@ export default class JoplinCommands {
|
||||
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
|
||||
* ```
|
||||
*/
|
||||
async execute(commandName: string, ...args:any[]):Promise<any> {
|
||||
async execute(commandName: string, ...args:any[]):Promise<any | void> {
|
||||
return CommandService.instance().execute(commandName, ...args);
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,12 @@ export interface Command {
|
||||
name: string
|
||||
|
||||
/**
|
||||
* Label to be displayed on menu items or keyboard shortcut editor for example
|
||||
* Label to be displayed on menu items or keyboard shortcut editor for example.
|
||||
* If it is missing, it's assumed it's a private command, to be called programmatically only.
|
||||
* In that case the command will not appear in the shortcut editor or command panel, and logically
|
||||
* should not be used as a menu item.
|
||||
*/
|
||||
label: string
|
||||
label?: string
|
||||
|
||||
/**
|
||||
* Icon to be used on toolbar buttons for example
|
||||
@ -19,9 +22,9 @@ export interface Command {
|
||||
iconName?: string,
|
||||
|
||||
/**
|
||||
* Code to be ran when the command is executed. It maybe return a result.
|
||||
* Code to be ran when the command is executed. It may return a result.
|
||||
*/
|
||||
execute(props:any):Promise<any>
|
||||
execute(...args:any[]):Promise<any | void>
|
||||
|
||||
/**
|
||||
* Defines whether the command should be enabled or disabled, which in turns affects
|
||||
|
Reference in New Issue
Block a user