/**
 * Interface for the end user.
 * @memberof DataModel
 */
export type DataModel<R, M> = {
    decode(rawModel: {
        data: R;
        version: number;
    }): Promise<M>;
    encode(model: M): {
        data: R;
        version: number;
    };
    version: number;
};
/**
 * this is to be implemented to create a DataModel
 * @memberof DataModel
 */
export type DataSchema<R, M> = {
    decode(raw: R): Promise<M>;
    encode(data: M): R;
    migrations: Array<(arg0: any) => R | any>;
};
/**
 * @memberof DataModel
 */
export declare function createDataModel<R, M>(schema: DataSchema<R, M>): DataModel<R, M>;
//# sourceMappingURL=DataModel.d.ts.map