title: TypeScript isNan only accepts a number
body: <p>I work with WebStorm 2016.2.2, TypeScript 2.1, Node.js.</p>
  
  <p>For some reason, <code>isNan</code> is declared as a function that only accepts a number:</p>
  
  <pre><code>declare function isNaN(number: number): boolean;
  </code></pre>
  
  <p>I tried to change it to any, but it looks like it doesn't influence on the TSC. I still get the same error:</p>
  
  <blockquote>
    <p>Argument of type 'string' is not assignable to parameter of type
    'number'</p>
  </blockquote>
  
  <p>My code (simplified):</p>
  
  <pre><code>isNan("10");
  </code></pre>
  
  <p>How can I solve/workaround it?</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>Notice that according to specification, isNan's parameter can be any type: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN" rel="noreferrer">Number.isNan()</a></p>
  
  <p>Also: My code was simplified. I actually receive a parameter that may be either a string or a number, and if it's a string it may be either a stringy number that I would like to convert to number ("10") or a simple string ("Hello world").</p>
  
  <p>I didn't want to make this question long by including my entire code, but because it caused confusion, this is my real code:</p>
  
  <pre><code>            if (typeof expectedValue === "string" &amp;&amp; !isNaN(expectedValue)) {
                      expectedValue = +expectedValue;
                  }
  
              if (typeof actualValue === "string" &amp;&amp; !isNaN(ctualValue)) {
                  actualValue = +actualValue;
              }
  
              switch (this.operator) {
                  case Operator.equal:
                      return actualValue == expectedValue;
                  case Operator.notEqual:
                      return actualValue === undefined || actualValue != expectedValue;
                  case Operator.greaterThan:
                      return actualValue &gt; expectedValue;
                  case Operator.littleThan:
                      return actualValue &lt; expectedValue;
                  case Operator.greaterOrEqual:
                      return actualValue &gt;= expectedValue;
                  case Operator.littleOrEqual:
                      return actualValue &lt;= expectedValue;
              }
  </code></pre>