Entry<R>A pending request handed to a RequestResolver.
Details
An entry contains the original request, the fiber context needed to run it,
an uninterruptible flag used by batching and caching internals, and the
completeUnsafe callback used by resolvers to supply the final Exit.
export interface interface Entry<out R>A pending request handed to a RequestResolver.
Details
An entry contains the original request, the fiber context needed to run it,
an uninterruptible flag used by batching and caching internals, and the
completeUnsafe callback used by resolvers to supply the final Exit.
Entry<out function (type parameter) R in Entry<out R>R> {
readonly Entry<out R>.request: out Rrequest: function (type parameter) R in Entry<out R>R
readonly Entry<out R>.context: Context.Context<[R] extends [Request<infer _A, infer _E, infer _R>] ? _R : never>(property) Entry<out R>.context: {
mapUnsafe: ReadonlyMap<string, any>;
mutable: boolean;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
context: import ContextContext.type Context.Context = /*unresolved*/ anyContext<
[function (type parameter) R in Entry<out R>R] extends [interface Request<out A, out E = never, out R = never>A Request<A, E, R> is a request from a data source for a value of type A
that may fail with an E and have requirements of type R.
Example (Defining typed requests)
import type { Request } from "effect"
// Define a request that fetches a user by ID
interface GetUser extends Request.Request<string, Error> {
readonly _tag: "GetUser"
readonly id: number
}
// Define a request that fetches all users
interface GetAllUsers extends Request.Request<ReadonlyArray<string>, Error> {
readonly _tag: "GetAllUsers"
}
Request<infer function (type parameter) _A_A, infer function (type parameter) _E_E, infer function (type parameter) _R_R>] ? function (type parameter) _R_R : never
>
Entry<out R>.uninterruptible: booleanuninterruptible: boolean
function Entry(exit: Exit.Exit<[R] extends [Request<infer _A, infer _E, infer _R>] ? _A : never, [R] extends [Request<infer _A, infer _E, infer _R>] ? _E : never>): voidcompleteUnsafe(
exit: Exit.Exit<
[R] extends [
Request<infer _A, infer _E, infer _R>
]
? _A
: never,
[R] extends [
Request<infer _A, infer _E, infer _R>
]
? _E
: never
>
exit: import ExitExit.type Exit.Exit = /*unresolved*/ anyExit<
[function (type parameter) R in Entry<out R>R] extends [interface Request<out A, out E = never, out R = never>A Request<A, E, R> is a request from a data source for a value of type A
that may fail with an E and have requirements of type R.
Example (Defining typed requests)
import type { Request } from "effect"
// Define a request that fetches a user by ID
interface GetUser extends Request.Request<string, Error> {
readonly _tag: "GetUser"
readonly id: number
}
// Define a request that fetches all users
interface GetAllUsers extends Request.Request<ReadonlyArray<string>, Error> {
readonly _tag: "GetAllUsers"
}
Request<infer function (type parameter) _A_A, infer function (type parameter) _E_E, infer function (type parameter) _R_R>] ? function (type parameter) _A_A : never,
[function (type parameter) R in Entry<out R>R] extends [interface Request<out A, out E = never, out R = never>A Request<A, E, R> is a request from a data source for a value of type A
that may fail with an E and have requirements of type R.
Example (Defining typed requests)
import type { Request } from "effect"
// Define a request that fetches a user by ID
interface GetUser extends Request.Request<string, Error> {
readonly _tag: "GetUser"
readonly id: number
}
// Define a request that fetches all users
interface GetAllUsers extends Request.Request<ReadonlyArray<string>, Error> {
readonly _tag: "GetAllUsers"
}
Request<infer function (type parameter) _A_A, infer function (type parameter) _E_E, infer function (type parameter) _R_R>] ? function (type parameter) _E_E : never
>
): void
}