title: Approach to using TypeScript descriptor files, such as Knockout.d.ts
body: <p>I have just been looking over some of the examples from </p>
  
  <p><a href="https://github.com/borisyankov/DefinitelyTyped" rel="nofollow">https://github.com/borisyankov/DefinitelyTyped</a></p>
  
  <p>And noticed that some of the libraries in there were not as easy to just pick up and use as I thought, but this is probably because I am still a newcomer to the TypeScript show.</p>
  
  <p>So the first thing that struck me as off (using Knockout as the example here), none of it is included within a module, which I dont really think is a major issue probably more a design decision by whoever made it, but it seemed like it would make more sense (possibly because I tend to do more C# than other languages) because it would be self contained and easier to include other plugins under the namespace:</p>
  
  <p><code>i.e Knockout.ObservableString();</code></p>
  
  <p>Anyway the 2nd point is more about how to use these implementations in real world scenarios, as normally I would do something like:</p>
  
  <pre><code>function SomeClass() {
      var self = this;
  
      self.SomeObservable = ko.observable("default-value");
  }
  </code></pre>
  
  <p>Now I was expecting to do something like this:</p>
  
  <pre><code>/// The Ref
  interface ISomeClass {
      SomeObservable: KnockoutObservableString;
  }
  
  class SomeClass implements ISomeClass {
      // What goes here?
  }
  </code></pre>
  
  <p>Now pretend for a minute that there is some logical reason to make my POJO (I guess it should be called a POTO now though) an interface then implement it, as normally I wouldn't bother putting an interface on anything which has 0 behaviour.</p>
  
  <p>Now in the above example the interface would be fine as there is a <code>KnockoutObservableString</code> interface, however I couldn't find an implementation, so am I not meant to be using that interface or should I be making my own implementations?</p>
  
  <p>I could do with someone to just point me in the direction and answer:</p>
  
  <pre><code>A) Why it wasn't written as a module?
  B) How do you actually use the descriptors properly?
  </code></pre>