Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICloneable

Interface for data objects that are able to create their full binary copy.

Example

export class MyClass implements IMyClass, ICloneable {
  constructor() { };

  public clone(): any {
      var cloneObj = new (<any>this.constructor());

      // Copy every attribute from this to cloneObj here.
      ...

      return cloneObj;
  }
}

Hierarchy

  • ICloneable

Implemented by

Index

Methods

Methods

clone

  • clone(): any
  • Creates a binary clone of this object.

    Returns any

    a clone of this object.

Generated using TypeDoc