///
export interface OptionalCloneable {
$clone?(): T;
}
export interface IScope extends angular.IScope {
model: T;
}
export declare class ModelConf {
template: any;
formatter: any;
parser: any;
validator: any;
validatorAsync: any;
renderer: any;
watcher: any;
doThen: any;
opts: {
watchDeep: boolean;
log: boolean;
feedBack: boolean;
};
fromTemplate(template: any): ModelConf;
formatWith(formatter: (model: any) => any): ModelConf;
parseWith(parser: (model: any) => any): ModelConf;
validateWith(validator: () => Object): ModelConf;
validateAsyncWith(validator: () => Object): ModelConf;
renderWith(renderer: (model: any) => void): ModelConf;
watchWith(watcher: (model: any, prevModel: any) => void): ModelConf;
watchDeep(val: boolean): ModelConf;
feedBack(val: boolean): ModelConf;
log(): ModelConf;
then(doThen: Function): ModelConf;
}
export declare class Model> {
private readonly scope;
private readonly ngModel;
private readonly conf;
private feedBack;
constructor(scope: IScope, ngModel: angular.INgModelController, conf: ModelConf);
private initFormat;
private initRender;
private initWatch;
private initParse;
private initValidate;
}
export declare function create(scope: IScope, ngModel: angular.INgModelController): ModelConf;
export declare const createItem: (item?: any) => any;