Hyperlinkv0.8.0-beta.28

Request

Request.Resulttypeeffect/Request.ts:194
Result<T>

A utility type to extract the result type from a Request.

Example (Extracting a request result type)

import type { Request } from "effect"

interface GetUser extends Request.Request<string, Error> {
  readonly _tag: "GetUser"
  readonly id: number
}

// Extract the result type from a Request using the utility
type UserResult = Request.Result<GetUser> // Exit.Exit<string, Error>
utility types
Source effect/Request.ts:1942 lines
export type Result<T extends Request<any, any, any>> = T extends Request<infer A, infer E, infer _R> ? Exit.Exit<A, E>
  : never
Referenced by 4 symbols