MCPcopy
hub / github.com/ionic-team/capacitor / tryFn

Function tryFn

cli/src/util/fn.ts:1–9  ·  view source on GitHub ↗
(fn: T, ...args: any[])

Source from the content-addressed store, hash-verified

1export const tryFn = async <T extends (...args: any[]) => Promise<R>, R>(fn: T, ...args: any[]): Promise<R | null> => {
2 try {
3 return await fn(...args);
4 } catch {
5 // ignore
6 }
7
8 return null;
9};

Callers 2

loadConfigFunction · 0.90
loadExtConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected