Skip to content

Commit 25081cd

Browse files
committed
fix ts errors
related to microsoft#106358
1 parent a443309 commit 25081cd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/vs/base/common/async.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export function first<T>(promiseFactories: ITask<Promise<T>>[], shouldStop: (t:
432432

433433
interface ILimitedTaskFactory<T> {
434434
factory: ITask<Promise<T>>;
435-
c: (value?: T | Promise<T>) => void;
435+
c: (value: T | Promise<T>) => void;
436436
e: (error?: any) => void;
437437
}
438438

src/vs/base/test/browser/ui/tree/asyncDataTree.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ suite('AsyncDataTree', function () {
295295
return !!element.children && element.children.length > 0;
296296
}
297297
getChildren(element: Element): Promise<Element[]> {
298-
return new Promise(c => calls.push(() => c(element.children)));
298+
return new Promise(c => calls.push(() => c(element.children || [])));
299299
}
300300
};
301301

@@ -338,7 +338,7 @@ suite('AsyncDataTree', function () {
338338
return !!element.children && element.children.length > 0;
339339
}
340340
getChildren(element: Element): Promise<Element[]> {
341-
return new Promise(c => calls.push(() => c(element.children)));
341+
return new Promise(c => calls.push(() => c(element.children || [])));
342342
}
343343
};
344344

0 commit comments

Comments
 (0)