Interface for models using
in decorator mode (default). Use TypeScript interface merging to add full parent transparency to your model class.
interface BrandCompanionModelImpl extends KosCompanionDecorator<AvailabilityModel> {}@kosCompanion() // defaults to decorator modeclass BrandCompanionModelImpl implements IKosDataModel { // All parent properties are available directly get brandSpecificProperty() { return this.name; // 'name' from parent AvailabilityModel }} Copy
interface BrandCompanionModelImpl extends KosCompanionDecorator<AvailabilityModel> {}@kosCompanion() // defaults to decorator modeclass BrandCompanionModelImpl implements IKosDataModel { // All parent properties are available directly get brandSpecificProperty() { return this.name; // 'name' from parent AvailabilityModel }}
Gets the companion's parent model instance. Available in both decorator and composition modes. Provides access to the model this companion extends.
The parent model instance that this companion enhances
Interface for models using
Kos Companion
in decorator mode (default). Use TypeScript interface merging to add full parent transparency to your model class.
Example