(evaluate: () => A)
| 37 | } |
| 38 | |
| 39 | const result = <A>(evaluate: () => A): Result.Result<A, AuthError> => { |
| 40 | try { |
| 41 | return Result.succeed(evaluate()) |
| 42 | } catch (error) { |
| 43 | if (error instanceof AuthError) return Result.fail(error) |
| 44 | throw error |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | const textEncoder = new TextEncoder() |
| 49 | const textDecoder = new TextDecoder("utf-8", { fatal: true }) |
no test coverage detected