Skip to content

Commit dfdece6

Browse files
authored
fix types for task API props (microsoft#236735)
fix microsoft#231858
1 parent e5f9272 commit dfdece6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/vs/workbench/api/common/extHostTypes.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,9 @@ export class ShellExecution implements vscode.ShellExecution {
23432343
throw illegalArgument('command');
23442344
}
23452345
this._command = arg0;
2346-
this._args = arg1 as (string | vscode.ShellQuotedString)[];
2346+
if (arg1) {
2347+
this._args = arg1;
2348+
}
23472349
this._options = arg2;
23482350
} else {
23492351
if (typeof arg0 !== 'string') {
@@ -2380,7 +2382,7 @@ export class ShellExecution implements vscode.ShellExecution {
23802382
return this._args;
23812383
}
23822384

2383-
set args(value: (string | vscode.ShellQuotedString)[]) {
2385+
set args(value: (string | vscode.ShellQuotedString)[] | undefined) {
23842386
this._args = value || [];
23852387
}
23862388

src/vscode-dts/vscode.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8668,12 +8668,12 @@ declare module 'vscode' {
86688668
/**
86698669
* The shell command. Is `undefined` if created with a full command line.
86708670
*/
8671-
command: string | ShellQuotedString;
8671+
command: string | ShellQuotedString | undefined;
86728672

86738673
/**
86748674
* The shell args. Is `undefined` if created with a full command line.
86758675
*/
8676-
args: Array<string | ShellQuotedString>;
8676+
args: Array<string | ShellQuotedString> | undefined;
86778677

86788678
/**
86798679
* The shell options used when the command line is executed in a shell.

0 commit comments

Comments
 (0)