(runId: string, fn: () => Promise<T> | T)
| 7 | const storage = new AsyncLocalStorage<RunStore>(); |
| 8 | |
| 9 | export function withRun<T>(runId: string, fn: () => Promise<T> | T): Promise<T> | T { |
| 10 | return storage.run({ runId }, fn); |
| 11 | } |
| 12 | |
| 13 | export function currentRunId(): string | undefined { |
| 14 | return storage.getStore()?.runId; |
no outgoing calls
no test coverage detected