@@ -38,7 +38,7 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
3838 }
3939 }
4040
41- private static runTasks ( taskService : ITaskService , tasks : Array < Task | Promise < Task > > ) {
41+ private static runTasks ( taskService : ITaskService , tasks : Array < Task | Promise < Task | undefined > > ) {
4242 tasks . forEach ( task => {
4343 if ( task instanceof Promise ) {
4444 task . then ( promiseResult => {
@@ -52,8 +52,8 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
5252 } ) ;
5353 }
5454
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 > > ( ) ;
5757 const taskNames = new Array < string > ( ) ;
5858 if ( workspaceTaskResult ) {
5959 workspaceTaskResult . forEach ( resultElement => {
@@ -68,7 +68,7 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
6868 if ( resultElement . configurations ) {
6969 forEach ( resultElement . configurations . byIdentifier , ( configedTask ) => {
7070 if ( configedTask . value . runOptions . runOn === RunOnOptions . folderOpen ) {
71- tasks . push ( new Promise < Task > ( resolve => {
71+ tasks . push ( new Promise < Task | undefined > ( resolve => {
7272 taskService . getTask ( resultElement . workspaceFolder , configedTask . value . _id , true ) . then ( task => resolve ( task ) ) ;
7373 } ) ) ;
7474 if ( configedTask . value . _label ) {
0 commit comments