driveWhileHolding
driveWhileHolding<
T>(input,codes,fn):Promise<T>
Defined in: internal/driveSupport.ts:48
Holds codes for the duration of fn, then restores what was held before
— including when fn throws — and resolves with whatever fn returned. A
code already down on entry is left alone on both ends, so nesting composes:
an inner call that repeats one of the outer call’s codes does not drop it
when it returns.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”DriveHoldInput
readonly string[]
() => Promise<T>
Returns
Section titled “Returns”Promise<T>