withReentryGuard
withReentryGuard<
T>(values,key,fn):Promise<T>
Defined in: packages/repo/src/context-values.ts:67
withReentryGuard runs a function while holding a boolean context key.
If the guard key is already set, the function still runs, but the helper
does not modify the current guard state. This makes it safe to use in
interceptors that may trigger nested repository calls. To carry the guard
into a nested repository call, pass the same contextValues bag in that
call’s options.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”values
Section titled “values”ContextKey<boolean>
() => T | Promise<T>
Returns
Section titled “Returns”Promise<T>