• A ComplexBus with only a subset of its fields.

    Example

    import * as io from "@prelude-io/core";

    const Pet = io.Complex("NestedBus", {
    species: io.string,
    name: io.string,
    });

    // PartialPet is a new ComplexBus with only the "name" field
    const PartialPet = io.Partial(Pet, ["name"]);

    Type Parameters

    Parameters

    • full: ComplexBus<CF>

      The Complex bus to base the partial of

    • fields: readonly F[]

      The fields to include in the partial

    • name: string = ...

      An alias for this bus. Defaults to Partial(ComplexName[field, field, ...])

    Returns ComplexBus<PartialFields<CF, F>>

    The partial bus

Generated using TypeDoc