type-alias / @typed/template/Renderable

Renderable.Success

Recursively computes the terminal value emitted by a Renderable.

Package version
1.0.0-beta.7
Category
Renderable output inference
Since
1.0.0
Member of
Renderable

Import

import { Renderable } from "@typed/template/Renderable";

Access Renderable.Success through the imported Renderable export. Its declaration below describes the member.

Signatures

type Success<T> = [
    T
] extends [
    never
] ? never : T extends Many<infer A, any, any> ? ReadonlyArray<A> : T extends Fx.Fx<infer A, any, any> ? A : T extends Stream.Stream<infer A, any, any> ? A : T extends Effect.Effect<infer A, any, any> ? Success<A> : T extends Option.Option<infer A> ? Success<A> | null : T extends ReadonlyArray<any> ? {
    readonly [K in keyof T]: Success<T[K]>;
} : T extends null | undefined | void ? null : T extends (...args: Array<any>) => any ? null : T extends RenderEvent ? T : T extends object ? {
    readonly [K in keyof T]: Success<T[K]>;
} : T;

Why

Effects, Options, arrays, and object structures are lifted without losing their resulting shape.

Ownership and lifetime

This projection describes values but owns none of them.

Other public imports

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

Source