title: Typescript not inferring rest parameters correctly
body: <p>There is a function <code>bar</code> of type <code>Bar</code>. Modified version of the function (<code>barStochastic</code>) is supposed to reset the pseudo-random generator before calling, the <code>bar</code>, but apart from that, it is identical.</p>
  
  <p>Since <code>Bar</code> has many arguments, I want to pass them using <code>...args</code> spread syntax.</p>
  
  <pre class="lang-ts prettyprint-override"><code>const random = {
      initState() {
          return 1;
      },
  };
  type Bar = (a: number, b: number, c: number) =&gt; number;
  const barDeterministic: Bar = (a, b, c) =&gt; {
      return a + b + c;
  };
  const barStochastic: Bar = (...args) =&gt; {
      random.initState();
      return barDeterministic(...args);
  };
  </code></pre>
  
  <p>My editor does not complain about this (it is usually consistent with TS compiler), but compilation fails.</p>
  
  <pre><code>error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.
  
  10     const barStochastic: Bar = (...args) =&gt; {
                                     ~~~~~~~
  
  
  error TS2556: Expected 3 arguments, but got 0 or more.
  
  12         return barDeterministic(...args);
                    ~~~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p><strong>I would expect <code>...args</code> to be inferred as <code>[number, number, number]</code>.
  That would solve both errors.</strong></p>
  
  <p>Is this a bug or intended behavior?</p>
  
  <hr>
  
  <p>Setup:</p>
  
  <pre><code>Deepin 15.7 Desktop
  Node v10.9.0
  tsc 2.9.2
  vscode 1.27.1
  </code></pre>
  
  <p><code>tsconfig.json</code>:
  </p>
  
  <pre><code>{
    "include": [
      "./src/**/*"
    ],
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "lib": [
        "es2015"
      ],
      "allowJs": true,
      "sourceMap": true,
      "outDir": "./dist",
      "rootDir": "./src",
      "strict": true,
      "moduleResolution": "node",
      "baseUrl": "./src",
    }
  }
  </code></pre>