diff --git a/src/builder.ts b/src/builder.ts index ffc32c0c..fd4bdd95 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -12,7 +12,7 @@ let als: AsyncLocalStorage> = new AsyncLocalStorage als?.getStore(); -export const runWithContext = (store: Map, callback: (args: any[]) => void, ...args: any[]) => { +export const runWithContext = (store: Map, callback: (args: any[]) => T, ...args: any[]) => { if (!als) { throw new Error('AsyncLocalStorage is not supported'); }