title: TypeError: Object prototype may only be an Object or null: undefined
body: <p>Below if I import <code>Entity</code> I get the posts's subject error (TypeError: Object prototype may only be an Object or null: undefined), but if I replace the import with the actual <code>Entity</code> declaration the code runs fine.</p>
  
  <p><a href="https://stackblitz.com/edit/typescript-ztvxdz?file=Customer.ts" rel="noreferrer">Stackblitz demo here</a>.</p>
  
  <p>This is <code>Customer.ts</code> in the form that produces the error when I run the code with <code>ts-node</code>:</p>
  
  <p>index.ts</p>
  
  <pre><code>export { Customer } from "./Customer";
  export { Entity } from "./Entity";
  </code></pre>
  
  <p>Customer.ts</p>
  
  <pre><code>import { Entity } from "./index";
  
  export class Customer extends Entity {
    sku: string;
    constructor(po: any) {
      super();
      this.sku = po.sku;
    }
  }
  </code></pre>
  
  <p>Entity.ts</p>
  
  <pre><code>export abstract class Entity {
    id?: string;
  }    
  </code></pre>
  
  <p>Run.ts (The test code)</p>
  
  <pre><code>import {Customer} from "./";
  
  let c = new Customer({
    name: "Bob"
  });
  console.log(c);
  </code></pre>
  
  <p>If I replace the <code>Entity</code> import with the declaration like this:</p>
  
  <pre><code>export abstract class Entity {
    id?: string;
  }    
  
  export class Customer extends Entity {
    sku: string;
    constructor(po: any) {
      super();
      this.sku = po.sku;
    }
  }
  </code></pre>
  
  <p>Then <code>Run.ts</code> logs this:</p>
  
  <pre><code>Customer { sku: undefined }
  </code></pre>
  
  <p>In other words it runs fine and produces no errors.  Thoughts?</p>