StoreProvidedContext<T, Ctx>Remove the requirement channel Ctx from every method in a resolved-effects shape, recursing into
nested sub-trees — the per-method-precise result of provideContext. Mirrors
CatchWriteError, but subtracts the provided context Ctx from each method's requirement
rather than catching an error — sound like Effect.provideContext (R → Exclude<R, Ctx>), so a
requirement the context does not cover survives as a residual (caught at a later assignment)
instead of being silently claimed never. A write method
(...a) => Effect<S, E, R> → (...a) => Effect<S, E, Exclude<R, Ctx>>; a bare Effect custom
member is subtracted too; the StoreEffectsVariance brand's non-effect members pass through
(the function-passthrough branch keeps _C intact); a sub-tree recurses.
export type type StoreProvidedContext<T, Ctx> =
T extends (
...args: infer A
) => Effect.Effect<infer S, infer E, infer R>
? (
...args: A
) => Effect.Effect<S, E, Exclude<R, Ctx>>
: T extends Effect.Effect<
infer S,
infer E,
infer R
>
? Effect.Effect<S, E, Exclude<R, Ctx>>
: T extends (
...args: ReadonlyArray<never>
) => unknown
? T
: T extends object
? {
readonly [K in keyof T]: StoreProvidedContext<
T[K],
Ctx
>
}
: T
Remove the requirement channel Ctx from every method in a resolved-effects shape, recursing into
nested sub-trees — the per-method-precise result of
provideContext
. Mirrors
CatchWriteError
, but subtracts the provided context Ctx from each method's requirement
rather than catching an error — sound like Effect.provideContext (R → Exclude<R, Ctx>), so a
requirement the context does not cover survives as a residual (caught at a later assignment)
instead of being silently claimed never. A write method
(...a) => Effect<S, E, R> → (...a) => Effect<S, E, Exclude<R, Ctx>>; a bare
Effect
custom
member is subtracted too; the
StoreEffectsVariance
brand's non-effect members pass through
(the function-passthrough branch keeps _C intact); a sub-tree recurses.
StoreProvidedContext<function (type parameter) T in type StoreProvidedContext<T, Ctx>T, function (type parameter) Ctx in type StoreProvidedContext<T, Ctx>Ctx> = function (type parameter) T in type StoreProvidedContext<T, Ctx>T extends (
...args: A extends unknown[]args: infer function (type parameter) AA
) => import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<infer function (type parameter) SS, infer function (type parameter) EE, infer function (type parameter) RR>
? (...args: A extends unknown[]args: function (type parameter) AA) => import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<function (type parameter) SS, function (type parameter) EE, type Exclude<T, U> = T extends U
? never
: T
Exclude from T those types that are assignable to U
Exclude<function (type parameter) RR, function (type parameter) Ctx in type StoreProvidedContext<T, Ctx>Ctx>>
: function (type parameter) T in type StoreProvidedContext<T, Ctx>T extends import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<infer function (type parameter) SS, infer function (type parameter) EE, infer function (type parameter) RR>
? import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<function (type parameter) SS, function (type parameter) EE, type Exclude<T, U> = T extends U
? never
: T
Exclude from T those types that are assignable to U
Exclude<function (type parameter) RR, function (type parameter) Ctx in type StoreProvidedContext<T, Ctx>Ctx>>
: function (type parameter) T in type StoreProvidedContext<T, Ctx>T extends (...args: readonly never[]args: interface ReadonlyArray<T>ReadonlyArray<never>) => unknown
? function (type parameter) T in type StoreProvidedContext<T, Ctx>T
: function (type parameter) T in type StoreProvidedContext<T, Ctx>T extends object
? { readonly [function (type parameter) KK in keyof function (type parameter) T in type StoreProvidedContext<T, Ctx>T]: type StoreProvidedContext<T, Ctx> =
T extends (
...args: infer A
) => Effect.Effect<infer S, infer E, infer R>
? (
...args: A
) => Effect.Effect<S, E, Exclude<R, Ctx>>
: T extends Effect.Effect<
infer S,
infer E,
infer R
>
? Effect.Effect<S, E, Exclude<R, Ctx>>
: T extends (
...args: ReadonlyArray<never>
) => unknown
? T
: T extends object
? {
readonly [K in keyof T]: StoreProvidedContext<
T[K],
Ctx
>
}
: T
Remove the requirement channel Ctx from every method in a resolved-effects shape, recursing into
nested sub-trees — the per-method-precise result of
provideContext
. Mirrors
CatchWriteError
, but subtracts the provided context Ctx from each method's requirement
rather than catching an error — sound like Effect.provideContext (R → Exclude<R, Ctx>), so a
requirement the context does not cover survives as a residual (caught at a later assignment)
instead of being silently claimed never. A write method
(...a) => Effect<S, E, R> → (...a) => Effect<S, E, Exclude<R, Ctx>>; a bare
Effect
custom
member is subtracted too; the
StoreEffectsVariance
brand's non-effect members pass through
(the function-passthrough branch keeps _C intact); a sub-tree recurses.
StoreProvidedContext<function (type parameter) T in type StoreProvidedContext<T, Ctx>T[function (type parameter) KK], function (type parameter) Ctx in type StoreProvidedContext<T, Ctx>Ctx> }
: function (type parameter) T in type StoreProvidedContext<T, Ctx>T;