Extracting Generic Parameters of an Effect in Effect Library
Does Effect have a type utility for extracting the generic parameters of an Effect? For example, I have the following helpers:
export type GetEffectErrorType<E> = E extends Effect.Effect<unknown, infer U, unknown> ? U : E;
export type GetFunctionEffectErrorType<F extends (...args: any[]) => Effect.Effect<unknown, unknown, unknown>> =
GetEffectErrorType<ReturnType<F>>;