@vuex-orm/core
Version:
The Vuex plugin to enable Object-Relational Mapping access to the Vuex Store.
21 lines (20 loc) • 553 B
TypeScript
import Record from '../data/Record';
import Model from '../model/Model';
export default abstract class Attribute {
/**
* The model that this attributes is being registerd.
*/
model: typeof Model;
/**
* The default value of the field.
*/
value: any;
/**
* Create a new attribute instance.
*/
constructor(model: typeof Model);
/**
* Convert given value to the appropriate value for the attribute.
*/
abstract make(value: any, parent: Record, key: string): any;
}