UNPKG

@awesome-nodes/mvvm

Version:

Application development framework using the *model* *view* *view-model* design pattern.

29 lines (28 loc) 954 B
import { ObjectModel } from "../model"; import { IViewModel } from "../view-model"; /** * Represents the object base for all ngx components within the model-view-view-model pattern. * @template TViewModel, TModel */ export declare abstract class ComponentBase<TViewModel extends IViewModel<TModel>, TModel extends ObjectModel = ObjectModel> { private readonly _vm; /** * Returns the view-model associated with this component instance. */ get vm(): TViewModel; /** * Returns the model instance from the view-model associated with this component instance. * @returns {TModel} */ get model(): TModel; /** * Sets the model instance for the view-model associated with this component instance. * @param {TModel} value */ set model(value: TModel); /** * Initialized this component base instance. * @param {TViewModel} _vm */ protected constructor(_vm: TViewModel); }