title: Typescript throw error Property 'to' does not exist on type 'Matchers' when compiling mocha/chai test file
body: <p>I'm trying to port my javascript unit tests to typescript, however, a simply test with build in matcher fails:</p>
  
  <pre><code>describe('test getBranches', function() {
          it('returns an array of branches', function() {
              branchService.getBranches(owner, name)
              .then(function(res) {
                  expect(res).to.exist;//&lt;-- this is where the error is from
              })
          })
      })
  </code></pre>
  
  <p>The error says:</p>
  
  <pre><code>error TS2339: Property 'to' does not exist on type 'Matchers'.
  </code></pre>
  
  <p>I'm new to typescript but I guess I'm missing some type files for mocha or chai? I have since installed <code>typings</code> and did the following:</p>
  
  <pre><code>typings install dt~mocha --save --global
  typings install dt~chai --save --global
  typings install dt~chai-as-promised --save --global
  </code></pre>
  
  <p>But it doesn't make a difference at all.</p>
  
  <p><strong>Note that the generated js file is fine, the test passed</strong>. I just want to know why typescript is giving this error and how can I make it disappear.</p>