function / @typed/template/Render

liftRenderableToFx

Converts any Renderable into an Fx while preserving its nested errors and service requirements.

Package version
1.0.0-beta.7
Category
Renderable normalization
Since
1.0.0

Import

import { liftRenderableToFx } from "@typed/template/Render";

Signatures

export declare function liftRenderableToFx<const T extends Renderable.Any>(renderable: T): Fx.Fx<Renderable.Success<T>, Renderable.Error<T>, Renderable.Services<T>>;
export declare function liftRenderableToFx<E = never, R = never>(renderable: Renderable<unknown, E, R>): Fx.Fx<any, E, R>;

Why

Effect, Stream, Fx, Option, arrays, object structures, primitives, and existing RenderEvents all enter rendering through one push-based substrate. This is the compositional bridge that keeps Effect v4 foundational rather than replacing it with a component-specific runtime.

Ownership and lifetime

Lifting is lazy. The Scope running the returned Fx owns upstream acquisition, interruption, and finalizers; existing DOM/HTML events retain their producer’s ownership contract.

Examples

import { Effect } from "effect"
import { liftRenderableToFx } from "@typed/template/Render"

const output = liftRenderableToFx(Effect.succeed("ready"))

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source