title: In TypeScript with jQuery, why do I get the error 'this' implicitly has type any
body: <p>My code is as follows:</p>
  
  <pre><code>$(function() {
  
      $("table").on("click", function() {
        const button = $(this);
      });
  
  });
  </code></pre>
  
  <p>My error is:</p>
  
  <p>this implicitly has type 'any' because it does not have a type annotation.</p>
  
  <p>How do I fix this error?</p>
  
  <p>Edit:</p>
  
  <p>My tsconfig.json is as follows:</p>
  
  <pre><code>{
      "compilerOptions": {
          "module": "commonjs",
          "target": "es6",
          "noImplicitAny": true,
          "moduleResolution": "node",
          "sourceMap": true,
          "strict": true,
          "outDir": "dist",
          "baseUrl": ".",
          "paths": {
              "*": [
                  "node_modules/*",
                  "src/types/*"
              ]
          }
      },
      "include": [
          "src/**/*"
      ]
  }
  </code></pre>
  
  <p>Edit 2:</p>
  
  <p>I have the following in my package.json</p>
  
  <pre><code>"@types/jquery": "^2.0.41",
  </code></pre>