import { ENTITY_TYPE } from './constant'; export interface IEntityModel { [propName: string]: any; save(): Promise; toJSON(): string; toObject(): {}; } export interface IContextData { type: ENTITY_TYPE; context: IEntityModel; } export default class EntityModel implements IEntityModel { constructor(type: ENTITY_TYPE, entityData: { [name: string]: any; }, editableFields?: string[], onSave?: (model: IEntityModel) => Promise); [propName: string]: any; save(): Promise; toJSON(): string; toObject(): any; private _getEntityDataDefinition; }