MCPcopy Create free account
hub / github.com/code-pushup/cli / settlePromise

Function settlePromise

packages/utils/src/lib/promises.ts:32–41  ·  view source on GitHub ↗
(
  promise: Promise<T>,
)

Source from the content-addressed store, hash-verified

30}
31
32export async function settlePromise<T>(
33 promise: Promise<T>,
34): Promise<PromiseSettledResult<T>> {
35 try {
36 const value = await promise;
37 return { status: 'fulfilled', value };
38 } catch (error) {
39 return { status: 'rejected', reason: error };
40 }
41}

Callers 4

importModuleFunction · 0.85
groupMethod · 0.85
#spinnerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected