title: How do I create Ambient Class Declarations in TypeScript
body: <p>I am trying to create a .d.ts file for the KineticJS library. So far I have created the following interface declaration "kinect.d.ts".(I cropped the code a bit for stackoverflow but I hope you get the idea)</p>
  
  <pre><code>module Kinetic {
  
      interface Rect extends  Shape {
          constructor (config) ;
      }
  
      interface Shape extends Node
      { 
  
      }
  
      interface Node {
          constructor (config);
          clone(attrs): Node;
          getAbsoluteOpacity(): number;
          getAbsolutePosition(): any;       
  
          /*
          other methods removed for stackoverflow example
          */
      }
  }
  </code></pre>
  
  <p>I hoped this would be enough to be able to create a Kinetic.Rect object in my app.ts file</p>
  
  <pre><code>/// &lt;reference path="Kinetic.d.ts" /&gt;
  var rect = new Kinetic.Rect({
            x: 239,
            y: 75,
            width: 100,
            height: 50        
          });
  </code></pre>
  
  <p>But it appears I have to do some extra work to use the KineticJS classes (like Rect) in TypeScript. Could anyone give some pointers on how to archive this?</p>