title: Using TypeScript with 'aws-sdk-mock'
body: <p>So this question was asked and there was an answer here:
  <a href="https://stackoverflow.com/questions/50978706/is-it-possible-to-use-typescript-with-aws-sdk-mock">Is it possible to use TypeScript with &#39;aws-sdk-mock&#39;</a></p>
  
  <p>I don't have enough reputation to ask about the answer, so I had to create another question, because I couldn't get the answer to work.</p>
  
  <p>Here's the entirety of my test code:</p>
  
  <pre><code>const AWSMock = require('aws-sdk-mock');
  const AWS = require('aws-sdk');
  AWSMock.setSDKInstance(AWS);
  AWSMock.mock('DynamoDB', 'putItem', function (params, callback) {
    console.log('MOCK WORKS!')
  });
  
  const ddb = new AWS.DynamoDB();
  ddb.putItem(null, function(err, data) {
    console.log('NOT MOCKED!')
  });
  
  AWSMock.restore();
  </code></pre>
  
  <p>Versions:</p>
  
  <p>aws-sdk: 2.286.2</p>
  
  <p>aws-sdk-mock: 4.0.0</p>
  
  <p>Test framework: mocha 3.4.2</p>
  
  <p>Any thoughts? Thanks!</p>