/**
 * Prototype is a creational design pattern that copies
 * existing objects without making the code dependent on
 * their classes.
 */ export default class Prototype { public primitive : number = 0 ; public component : object = { } ; public clone ( this ) { const clone = Object . create ( this ) ; clone . component = Object . create ( this . component ) ; return clone ; } }