ng-ptplibraries
Version:
33 lines (32 loc) • 1.19 kB
TypeScript
export declare class ServiceBaseModel {
private _keys?;
private _arrays?;
/**
* Returns an object that removes dynamic properties that does not belong to the derived model.
* @param instance The `JSON` or `OBJECT` with values that will be assigned to the derived model.
*/
static CreateSerialized(instance: any): any;
static CreateSerializedFromClass(instance: any, cls: any): any;
/**
* Returns a `BaseModel` class that is serialized.
* @param instance The `JSON` with values that will be assigned to the derived model.
*/
static Create(instance: any): ServiceBaseModel;
static CreateFromClass(instance: any, cls: any): any;
SetArrays(param: {
property: string;
class: any;
}[]): void;
/**
* Serializes the derived class.
* Freezes base properties from derived models.
* Stores them in a key storage.
* Removes dynamically added properties when Deserialize is used.
*/
Serialize(): void;
/**
* Gets the values of all the serialized properties.
* Neglects dynamically added properties.
*/
Deserialize(): any;
}