title: How can I deep copy in typescript
body: <p>I have object in typescript:</p>
  
  <pre><code>export class A {
   public var1: boolean = false;
   public var2: boolean = false;
   public b: B = new B();
  </code></pre>
  
  <p>}</p>
  
  <pre><code>export class B {
     public v: boolean = false;
  }
  </code></pre>
  
  <p>And declare and exist object:</p>
  
  <pre><code>...
  public a: A = new A();
  ...
  </code></pre>
  
  <p>When I use jQuery: </p>
  
  <pre><code>const myCopy: A = $.extend(true, {}, this.a);
  this.a.b.v = true;
  </code></pre>
  
  <p>When I change variable object this.a  I see change in copy.
  How Can I deep copy in this situation.</p>