Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract Class Cloneable can be extended to give the child class the ability to clone its self. The child class must pass its class to super. You can then pass any needed arguments to help build the cloned class to the protected _clone() method.

Example:

class Example extends Cloneable {

} Todo: There must be more non primitive build in types to check. But for our current purposes, this works great.

Type parameters

  • T

Hierarchy

Index

Methods

Methods

clone

  • clone(): T
  • clone - returns a copy of the classes with new values and not references

    Returns T

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc