(error: T)
| 192 | export type ORPCErrorJSON<TCode extends string, TData> = Pick<ORPCError<TCode, TData>, 'defined' | 'code' | 'status' | 'message' | 'data'> |
| 193 | |
| 194 | export function isDefinedError<T>(error: T): error is Extract<T, ORPCError<any, any>> { |
| 195 | return error instanceof ORPCError && error.defined |
| 196 | } |
| 197 | |
| 198 | export function toORPCError(error: unknown): ORPCError<any, any> { |
| 199 | return error instanceof ORPCError |
no outgoing calls
no test coverage detected