import { IIdentifier } from './interfaces/IIdentifier'; import { IModelConstructor } from './interfaces/IModelConstructor'; import { IType } from './interfaces/IType'; import { PureCollection } from './PureCollection'; import { PureModel } from './PureModel'; /** * Set a model property as tracked * * @template T * @param {T} obj Target model * @param {string} key Property name * @returns {void} */ declare function propFn(obj: T, key: string, opts?: object): void; export declare const prop: typeof propFn & { /** * Set the default value for the model property * * @param {any} value The default property value * @returns {(obj: PureModel, key: string) => void} */ defaultValue(value: any): (obj: PureModel, key: string) => void; /** * Add a reference to a single other model * * @param {typeof PureModel} refModel Model type the reference will point to * @returns {(obj: PureModel, key: string) => void} */ toOne(refModel: string | number | typeof PureModel): (obj: PureModel, key: string) => void; /** * Add a reference to multiple other models * * @param {typeof PureModel} refModel Model type the reference will point to * @param {string} [property] Use a foreign key from the other model to get this reference (computed back reference) * @returns {(obj: PureModel, key: string) => void} */ toMany(refModel: string | number | typeof PureModel, property?: string | undefined): (obj: PureModel, key: string) => void; /** * Add a reference to a single or multiple other models * * @param {typeof PureModel} refModel Model type the reference will point to * @returns {(obj: PureModel, key: string) => void} */ toOneOrMany(refModel: string | number | typeof PureModel): (obj: PureModel, key: string) => void; /** * Define the identifier property on the model * * @param {T} obj Target model * @param {string} key Identifier property name * @returns {void} */ identifier(obj: T, key: string, opts?: object | undefined): void; /** * Define the type property on the model * * @param {T} obj Target model * @param {string} key Type property name * @returns {void} */ type(obj: T, key: string, opts?: object | undefined): void; }; export declare function view(modelType: IModelConstructor | IType, options?: { sortMethod?: string | ((item: TModel) => any); models?: Array; unique?: boolean; mixins?: Array<(view: any) => any>; }): (obj: TCollection, key: string, opts?: object | undefined) => void; export {};