data-cap
    Preparing search index...

    Interface DataSchema<TFields>

    The full schema shape both buildData and the runtime's createData accept -- each reads only the part it needs (buildData only ever reads fields; a getters/mutators/subscriptions section on the same object is simply ignored by it). documentData accepts this same shape so one documentData(schema, docs) call documents whichever of the two a given schema is ultimately passed to.

    interface DataSchema<TFields extends FieldsShape> {
        fields: TFields;
        getters?: Record<
            string,
            GetterDefinition<InferFields<TFields>, any, any, any>,
        >;
        mutators?: Record<
            string,
            MutatorDefinition<InferFields<TFields>, any, any, any>,
        >;
        subscriptions?: Record<
            string,
            SubscriptionDefinition<InferFields<TFields>, any, any, any>,
        >;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    fields: TFields

    The default/example value for every field, declaring the capability's shape.

    getters?: Record<string, GetterDefinition<InferFields<TFields>, any, any, any>>

    Named getter operations, keyed by the name they're called/documented under.

    mutators?: Record<
        string,
        MutatorDefinition<InferFields<TFields>, any, any, any>,
    >

    Named mutator operations, keyed by the name they're called/documented under.

    subscriptions?: Record<
        string,
        SubscriptionDefinition<InferFields<TFields>, any, any, any>,
    >

    Named subscription operations, keyed by the name they're called/documented under.