@@ -38,7 +38,7 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
38
38
}
39
39
}
40
40
41
- private static runTasks ( taskService : ITaskService , tasks : Array < Task | Promise < Task > > ) {
41
+ private static runTasks ( taskService : ITaskService , tasks : Array < Task | Promise < Task | undefined > > ) {
42
42
tasks . forEach ( task => {
43
43
if ( task instanceof Promise ) {
44
44
task . then ( promiseResult => {
@@ -52,8 +52,8 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
52
52
} ) ;
53
53
}
54
54
55
- private static findAutoTasks ( taskService : ITaskService , workspaceTaskResult : Map < string , WorkspaceFolderTaskResult > ) : { tasks : Array < Task | Promise < Task > > , taskNames : Array < string > } {
56
- const tasks = new Array < Task | Promise < Task > > ( ) ;
55
+ private static findAutoTasks ( taskService : ITaskService , workspaceTaskResult : Map < string , WorkspaceFolderTaskResult > ) : { tasks : Array < Task | Promise < Task | undefined > > , taskNames : Array < string > } {
56
+ const tasks = new Array < Task | Promise < Task | undefined > > ( ) ;
57
57
const taskNames = new Array < string > ( ) ;
58
58
if ( workspaceTaskResult ) {
59
59
workspaceTaskResult . forEach ( resultElement => {
@@ -68,7 +68,7 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
68
68
if ( resultElement . configurations ) {
69
69
forEach ( resultElement . configurations . byIdentifier , ( configedTask ) => {
70
70
if ( configedTask . value . runOptions . runOn === RunOnOptions . folderOpen ) {
71
- tasks . push ( new Promise < Task > ( resolve => {
71
+ tasks . push ( new Promise < Task | undefined > ( resolve => {
72
72
taskService . getTask ( resultElement . workspaceFolder , configedTask . value . _id , true ) . then ( task => resolve ( task ) ) ;
73
73
} ) ) ;
74
74
if ( configedTask . value . _label ) {
0 commit comments