( promise: Promise<T>, )
| 30 | } |
| 31 | |
| 32 | export 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 | } |
no outgoing calls
no test coverage detected