title: Implementing prototypes for interfaces in TypeScript
body: <p>I have created a <code>TypeScript</code> interface for my service results. Now I want to define a basic functionality for both my functions inside. The problem is I get an error:</p>
  
  <blockquote>
    <p>The property 'ServiceResult' does not exist on value of type 'Support'.</p>
  </blockquote>
  
  <p>I use <code>WebStorm</code> for development (<code>VS2012</code> makes me nervous because on freezes by large projects - waiting for better integration:P).</p>
  
  <p>Here's how I do it:</p>
  
  <pre><code>module Support {
      export interface ServiceResult extends Object {
          Error?: ServiceError;
          Check?(): void;
          GetErrorMessage?(): string;
      }
  }
  
  Support.ServiceResult.prototype.Check = () =&gt; {
     // (...)
  };
  
  Support.ServiceResult.prototype.GetErrorMessage = () =&gt; {
     // (...)
  };
  </code></pre>
  
  <p>I have also tried to move my prototypes into the module, but same error still... (of course I removed <code>Support.</code> prefix).</p>