mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-20 23:29:57 +01:00
debt - Thenable -> Promise
This commit is contained in:
@@ -29,7 +29,7 @@ function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
|
||||
}
|
||||
|
||||
interface IMainCli {
|
||||
main: (argv: ParsedArgs) => Thenable<void>;
|
||||
main: (argv: ParsedArgs) => Promise<void>;
|
||||
}
|
||||
|
||||
export async function main(argv: string[]): Promise<any> {
|
||||
@@ -121,7 +121,7 @@ export async function main(argv: string[]): Promise<any> {
|
||||
|
||||
delete env['ELECTRON_RUN_AS_NODE'];
|
||||
|
||||
const processCallbacks: ((child: ChildProcess) => Thenable<any>)[] = [];
|
||||
const processCallbacks: ((child: ChildProcess) => Promise<any>)[] = [];
|
||||
|
||||
const verbose = args.verbose || args.status || typeof args['upload-logs'] !== 'undefined';
|
||||
if (verbose) {
|
||||
|
||||
@@ -62,7 +62,7 @@ export function getIdAndVersion(id: string): [string, string] {
|
||||
}
|
||||
|
||||
|
||||
type Task = { (): Thenable<void> };
|
||||
type Task = { (): Promise<void> };
|
||||
|
||||
class Main {
|
||||
|
||||
@@ -205,7 +205,7 @@ class Main {
|
||||
}
|
||||
}
|
||||
|
||||
private uninstallExtension(extensions: string[]): Thenable<any> {
|
||||
private uninstallExtension(extensions: string[]): Promise<any> {
|
||||
async function getExtensionId(extensionDescription: string): Promise<string> {
|
||||
if (!/\.vsix$/i.test(extensionDescription)) {
|
||||
return extensionDescription;
|
||||
|
||||
Reference in New Issue
Block a user