Merge from vscode 1ec43773e37997841c5af42b33ddb180e9735bf2

This commit is contained in:
ADS Merger
2020-03-29 01:29:32 +00:00
parent 586ec50916
commit a64304602e
316 changed files with 6524 additions and 11687 deletions

View File

@@ -73,9 +73,13 @@ interface ICommand {
id: string,
/**
* A function that is being executed with any arguments passed over.
* A function that is being executed with any arguments passed over. The
* return type will be send back to the caller.
*
* Note: arguments and return type should be serializable so that they can
* be exchanged across processes boundaries.
*/
handler: (...args: any[]) => void;
handler: (...args: any[]) => unknown;
}
interface IWorkbenchConstructionOptions {
@@ -217,7 +221,7 @@ async function create(domElement: HTMLElement, options: IWorkbenchConstructionOp
CommandsRegistry.registerCommand(command.id, (accessor, ...args) => {
// we currently only pass on the arguments but not the accessor
// to the command to reduce our exposure of internal API.
command.handler(...args);
return command.handler(...args);
});
}
}