Package: effect
Module: Request
A utility type to extract the error type from a Request.
Example (Extracting a request error type)
import type { Request } from "effect"
interface GetUser extends Request.Request<string, Error> {
readonly id: number
}
// Extract the error type from a Request using the utility
type UserError = Request.Error<GetUser> // Error
Signature
type Error<T> = [T] extends [Request<infer _A, infer _E, infer _R>] ? _E : never
Since v2.0.0