title: How can I get ReSharper to admit that the function parameters have the correct type?
body: <p>I'm using ReSharper 10.0.1 with TypeScript 1.7 and AngularJS 1.3.6. ReSharper is complaining about this section, with the error "Supplied parameters do not match any signature of call target: parameter type mismatch. Parameter 's' should have type assignable to 'string', but it has type 'any'. </p>
  
  <pre><code>items: $ServerTypes.IServerType[] = [a_set_of_Schema.state_objects_with_$type];
  var queue: Schema.state[] = [items[0]];
  state.transition.forEach((t: Schema.transition) =&gt; {
      if (!isNaN(parseInt(t.target))) { // ** Error here at t.target
          queue.unshift($scope.getStateById(t.target)); // ** Same error at t.target
      }
  });
  </code></pre>
  
  <p>The type of Schema.transition and Schema.state is fairly straightforward:</p>
  
  <pre><code>declare module MyStuff.Thing.Whatsit.Widget.Whatever.Schema
      export interface state {
          'id': string
          'transition': transition[]
      }
      export interface transition {
          'event': string;
          'Items': $ServerTypes.IServerType[]; // an object with a $type property
          'name': string;
          'target': string;
      }
  }
  </code></pre>
  
  <p>I use an import statement to shorten the module name. (This import is in a _references.ts file that I've referenced in every file.)</p>
  
  <pre><code>import Schema = MyStuff.Thing.Whatsit.Widget.Whatever.Schema;
  </code></pre>
  
  <p>The oddity about this is that Schema.state has one additional property most of the time: $type. This property allows the ASP.Net on the server to convert a JSON blob into correctly-typed C# classes on the server. The place where I find my Schema.state objects is an array of $ServerTypes.IServerType, where IServerType looks like this:</p>
  
  <pre><code>declare module $ServerTypes {
      export interface IServerType {
          $type: string
      }
  }
  </code></pre>
  
  <p>I want to keep the $type out of the Schema.state definition, because it's a C# implementation detail that (mostly) doesn't belong in the TypeScript code, and I have to create some Schema.state objects in the TypeScript code occasionally. There's a set of helper classes that will add the $type when needed. (Due to a JSON.NET limitation, $type must be the <em>first</em> property in the JSON object. The TypeScript code should <em>not</em> have to care about this.)</p>
  
  <p>The point is: <strong>t.target is a string. Both parseInt and $scope.getStateById take a single string parameter. Why does ReSharper think that t.target isn't a string?</strong> Everything compiles and runs just fine; ReSharper's complaints are the only trouble</p>
  
  <p>I want to use ReSharper, because it helps me keep my code clean. But if it's going to give false errors, then I'm going to have to disable it. Is there a way to get it to stop complaining, so I can use ReSharper effectively? I'm having this same error in numerous places; it's not just one or two.</p>