Skip to content

runWithLogStore

function runWithLogStore<T>(store: LogStore | undefined, fn: () => T): T

Runs fn inside the provided log store.

When store is undefined, runs fn without entering AsyncLocalStorage.

store LogStore | undefined

fn () => T

returns T

Learn: Context and waitUntil

Last updated: