Update action run return type (#15568)

* Update action run return type

* fix tests

* Update rest

* Add back null checks
This commit is contained in:
Charles Gagnon
2021-05-25 14:52:39 -07:00
committed by GitHub
parent 25352fa39c
commit 399406b732
29 changed files with 379 additions and 637 deletions

View File

@@ -18,12 +18,7 @@ export class CloseTabAction extends Action {
super(CloseTabAction.ID, CloseTabAction.LABEL, CloseTabAction.ICON);
}
run(): Promise<boolean> {
try {
this.closeFn.apply(this.context);
return Promise.resolve(true);
} catch (e) {
return Promise.resolve(false);
}
async run(): Promise<void> {
this.closeFn.apply(this.context);
}
}