( fn: (...x: Args) => Promise<Result>, ...args: Args )
| 10 | // fs Promise functions return errors, but no stack trace. This adds back in |
| 11 | // the stack trace. |
| 12 | export function withTrace<Args extends unknown[], Result>( |
| 13 | fn: (...x: Args) => Promise<Result>, |
| 14 | ...args: Args |
| 15 | ): Promise<Result> { |
| 16 | return fn(...args).catch((reason: Error) => { |
| 17 | throw Error(reason.message); |
| 18 | }); |
| 19 | } |
no outgoing calls
no test coverage detected