title: "as string" versus toString()
body: <p>I am writing some unit tests using jasmine. If I use:</p>
  
  <pre><code>let arg0 : string = http.put.calls.argsFor(0) as string;
  if(arg0.search(...
  </code></pre>
  
  <p>then I get the error <code>arg0.search</code> is not a function. Intellisense shows that arg0 is an array and not a string as expected. If I instead use:</p>
  
  <pre><code>let arg0 : string = http.put.calls.argsFor(0).toString();
  if(arg0.search(...
  </code></pre>
  
  <p>it works. Intellisense shows that the argsFor function signature has any as the return type. When called it returns an array.</p>
  
  <p>Why does the "as string" version not work and why am I not getting a compile error given arg0 in that case ends up holding an array instead of a string?</p>