fix types for task API props (#236735)

fix #231858
pull/236749/head
Megan Rogge 2024-12-20 12:23:36 -06:00 committed by GitHub
parent e5f9272019
commit dfdece69e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -2343,7 +2343,9 @@ export class ShellExecution implements vscode.ShellExecution {
throw illegalArgument('command');
}
this._command = arg0;
this._args = arg1 as (string | vscode.ShellQuotedString)[];
if (arg1) {
this._args = arg1;
}
this._options = arg2;
} else {
if (typeof arg0 !== 'string') {
@ -2380,7 +2382,7 @@ export class ShellExecution implements vscode.ShellExecution {
return this._args;
}
set args(value: (string | vscode.ShellQuotedString)[]) {
set args(value: (string | vscode.ShellQuotedString)[] | undefined) {
this._args = value || [];
}

View File

@ -8668,12 +8668,12 @@ declare module 'vscode' {
/**
* The shell command. Is `undefined` if created with a full command line.
*/
command: string | ShellQuotedString;
command: string | ShellQuotedString | undefined;
/**
* The shell args. Is `undefined` if created with a full command line.
*/
args: Array<string | ShellQuotedString>;
args: Array<string | ShellQuotedString> | undefined;
/**
* The shell options used when the command line is executed in a shell.