title: Declaring the type of 'this' in a typescript function?
body: <p>I'm writing a <a href="http://gruntjs.com/api/inside-tasks" rel="noreferrer">grunt task</a> in TypeScript. I'm trying to translate something I already have in JavaScript. </p>
  
  <p>So, when grunt runs a task, it runs a function. When it runs, grunt sets <code>this</code> to an object with useful properties, the same way that jQuery overloads <code>this</code> with the element you are working on. I could access useful properties like <code>this.files</code>;</p>
  
  <pre><code>grunt.registerMultiTask('clean', function() {
      this.files.forEach(function(f) { Delete(f); });
  });
  </code></pre>
  
  <p>So, "delete all the files in <code>this.files</code>".</p>
  
  <p>However, in TypeScript, I don't know if you can 'hint' to the compiler that <code>this</code> is a particular type, so I don't get intellisense. How do I tell TypeScript to consider <code>this</code> to be a different type?</p>