turbodombuilder - v0.9.22
    Preparing search index...

    Type Alias MvcGenerationProperties<ViewType, DataType, ModelType, EmitterType>

    Type representing a configuration object for an Mvc instance.

    type MvcGenerationProperties<
        ViewType extends TurboView = TurboView<any, any>,
        DataType extends object = object,
        ModelType extends TurboModel = TurboModel,
        EmitterType extends TurboEmitter = TurboEmitter,
    > = {
        view?: MvcInstanceOrConstructor<ViewType, TurboViewProperties>;
        model?:
            | ModelType
            | (new (data?: any, dataBlocksType?: "map" | "array") => ModelType);
        emitter?: MvcInstanceOrConstructor<EmitterType, ModelType>;
        controllers?: MvcManyInstancesOrConstructors<
            TurboController,
            TurboControllerProperties,
        >;
        handlers?: MvcManyInstancesOrConstructors<TurboHandler, ModelType>;
        interactors?: MvcManyInstancesOrConstructors<
            TurboInteractor,
            TurboInteractorProperties,
        >;
        tools?: MvcManyInstancesOrConstructors<TurboTool, TurboToolProperties>;
        substrates?: MvcManyInstancesOrConstructors<
            TurboSubstrate,
            TurboSubstrateProperties,
        >;
        data?: DataType;
        initialize?: boolean;
    }

    Type Parameters

    Index

    Properties

    view?: MvcInstanceOrConstructor<ViewType, TurboViewProperties>

    The view (or view constructor) to attach.

    model?:
        | ModelType
        | (new (data?: any, dataBlocksType?: "map" | "array") => ModelType)

    The model (or model constructor) to attach.

    emitter?: MvcInstanceOrConstructor<EmitterType, ModelType>

    The emitter (or emitter constructor) to attach. If not defined, a default TurboEmitter will be created.

    controllers?: MvcManyInstancesOrConstructors<
        TurboController,
        TurboControllerProperties,
    >

    The controller, constructor of controller, or array of the latter, to attach.

    handlers?: MvcManyInstancesOrConstructors<TurboHandler, ModelType>

    The handler, constructor of handler, or array of the latter, to attach.

    interactors?: MvcManyInstancesOrConstructors<
        TurboInteractor,
        TurboInteractorProperties,
    >

    The interactor, constructor of interactor, or array of the latter, to attach.

    tools?: MvcManyInstancesOrConstructors<TurboTool, TurboToolProperties>

    The tool, constructor of tool, or array of the latter, to attach.

    substrates?: MvcManyInstancesOrConstructors<
        TurboSubstrate,
        TurboSubstrateProperties,
    >

    The substrate, constructor of substrate, or array of the latter, to attach.

    data?: DataType

    The data to attach to the model.

    initialize?: boolean

    Whether to initialize the MVC pieces after setting them or not. Defaults to true.