MCPcopy Index your code
hub / github.com/tinyplex/tinybase / tryReturn

Function tryReturn

src/common/other.ts:149–159  ·  view source on GitHub ↗
(
  tryF: () => Return,
  catchReturn?: Return,
)

Source from the content-addressed store, hash-verified

147};
148
149export const tryReturn = <Return>(
150 tryF: () => Return,
151 catchReturn?: Return,
152): Return | void => {
153 try {
154 return tryF();
155 } catch {
156 /*! istanbul ignore next */
157 return catchReturn;
158 }
159};
160
161export const tryCatch = async <Return>(
162 action: () => Return | Promise<Return>,

Callers 2

EditableThingFunction · 0.90
handleTypeChangeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…