We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
addTask
1 parent 3e6f7f3 commit e7ffb8bCopy full SHA for e7ffb8b
src/Microsoft.AspNetCore.SpaServices/npm/domain-task/src/main.ts
@@ -7,7 +7,7 @@ const domainTaskBaseUrlStateKey = '__DOMAIN_TASK_INTERNAL_FETCH_BASEURL__DO_NOT_
7
8
let noDomainBaseUrl: string;
9
10
-export function addTask(task: PromiseLike<any>) {
+export function addTask<T>(task: PromiseLike<T>): PromiseLike<T> {
11
if (task && domain.active) {
12
const state = domainContext.get(domainTasksStateKey) as DomainTasksState;
13
if (state) {
@@ -32,6 +32,8 @@ export function addTask(task: PromiseLike<any>) {
32
});
33
}
34
35
+
36
+ return task;
37
38
39
export function run<T>(codeToRun: () => T, completionCallback: (error: any) => void): T {
0 commit comments