( value: unknown, error: E | LogtoErrorCode, status?: number )
| 9 | }; |
| 10 | |
| 11 | const assertThat: AssertThatFunction = <E extends Error>( |
| 12 | value: unknown, |
| 13 | error: E | LogtoErrorCode, |
| 14 | status?: number |
| 15 | ): asserts value => { |
| 16 | assert(value, error instanceof Error ? error : new RequestError({ code: error, status })); |
| 17 | }; |
| 18 | |
| 19 | export default assertThat; |
no outgoing calls
no test coverage detected