MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / tryWithFinally

Function tryWithFinally

packages/context/src/value-promise.ts:193–198  ·  view source on GitHub ↗
(
  action: () => ValueOrPromise<T>,
  finalAction: () => void,
)

Source from the content-addressed store, hash-verified

191 * @typeParam T - Type for the return value
192 */
193export function tryWithFinally<T>(
194 action: () => ValueOrPromise<T>,
195 finalAction: () => void,
196): ValueOrPromise<T> {
197 return tryCatchFinally(action, undefined, finalAction);
198}
199
200/**
201 * Try to run an action that returns a promise or a value with error and final

Callers 4

runWithBindingMethod · 0.90
runWithInjectionMethod · 0.90

Calls 1

tryCatchFinallyFunction · 0.85

Tested by

no test coverage detected