1 | /** @module data */
|
2 | /**
|
3 | * Interface for data objects that are able to create their full binary copy.
|
4 | *
|
5 | * ### Example ###
|
6 | *
|
7 | * export class MyClass implements IMyClass, ICloneable {
|
8 | * constructor() { };
|
9 | *
|
10 | * public clone(): any {
|
11 | * var cloneObj = new (<any>this.constructor());
|
12 | *
|
13 | * // Copy every attribute from this to cloneObj here.
|
14 | * ...
|
15 | *
|
16 | * return cloneObj;
|
17 | * }
|
18 | * }
|
19 | */
|
20 | export interface ICloneable {
|
21 | /**
|
22 | * Creates a binary clone of this object.
|
23 | *
|
24 | * @returns a clone of this object.
|
25 | */
|
26 | clone(): any;
|
27 | }
|