withReentryGuard
withReentryGuard<
T>(values,key,fn):Promise<T>
Defined in: packages/pubsub/src/context-values.ts:70
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 calls. To carry the guard into a nested
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>