title: TypeScript Error Object prototype may only be an Object or null: undefined
body: <p>Hey i've just started with TypeScript and i tried to copy a javascript to TypeScript and changed the stuff to be more Object oriented.
  Now i'm trying to start it with cmd and the ns-node command.</p>
  
  <pre><code>private username:string;
             ^
  TypeError: Object prototype may only be an Object or null: undefined
  </code></pre>
  
  <p>This Error doesn't make any sense so i googled it and saw that the problem might be ethe importinhgs of the project. I've tried every soultion on diffrent sites and they didn't help.</p>
  
  <p>So my Code:</p>
  
  <pre><code>import { Entity } from './Entity';
  import { Bullet } from './Bullet';
  
  import * as fs from "fs";
  export class Player extends Entity{
  
  private username:string;
  protected pressingRight:boolean ;
  protected pressingLeft:boolean ;
  ...
  }
  </code></pre>
  
  <p>So what could be the problem? Thy for your help</p>
  
  <p>EDIT:</p>
  
  <pre><code>    import {Point} from "./Point";
      import {Bullet} from "./Bullet";
  import {Player} from "./Player";
  export class Entity{
  
  protected x:number;
  protected y:number;
  protected spdX:number = 0;
  protected spdY:number = 0;
  protected id:number;
  protected map:string;
  
  
  protected static initPack = {player:[],bullet:[]};
  protected static removePack = {player:[],bullet:[]};
  
   constructor(x:number,y:number,id:number,map:string){
      this.x = x;
      this.y=y;
      this.id=id;
      this.map=map;
   }
  ...}
  </code></pre>
  
  <p>And the Bullet.ts :</p>
  
  <pre><code>    import {Entity} from './Entity';
  import {Player} from './Player';
  export class Bullet extends Entity{
  
  private angle:number;
  private parentID:number;
  private timer:number = 0;
  private toRemove:boolean=false;
  
  public static list={};
  
  constructor(x:number,y:number,map:string,parentId:number,angle:number,id:number){
      super(x,y,id,map);
      this.angle = angle;
      this.spdX= Math.cos(angle/180*Math.PI) * 10;
      this.spdY= Math.sin(angle/180*Math.PI) * 10;
      this.parentID = parentId;
  
      Bullet.list[this.id] = self;
      Bullet.initPack.bullet.push(this.getInitPack());
  }
  </code></pre>