title: TypeScript error: Reserved word 'this' used as name
body: <p>I am trying to get <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts" rel="nofollow noreferrer">this</a> Node.js TypeScript definition to work, but WebStorm gives me a big list of errors with all the same message: </p>
  
  <blockquote>
    <p>Reserved word 'this' used as name. This inspection
    reports on any uses of JavaScript reserved words being used as a name.
    The JavaScript specification reserves a number of words which are
    currently not used as JavaScript keywords. Using those words as
    identifiers may result in broken code if later versions of JavaScript
    use them as keywords.</p>
  </blockquote>
  
  <p>An example piece of code where this error happens due to the return type:</p>
  
  <p><a href="https://i.stack.imgur.com/KVgNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KVgNa.png" alt="Error example"></a></p>
  
  <p>Why can't the <code>this</code> keyword be a type? Am I perhaps using an old TypeScript compiler or is it a mistake in the typing?</p>
  
  <hr>
  
  <p><strong>Edit:</strong>
  To get rid of the errors I've just replaced all these <code>this</code> types with the type of the containing class or interface. For example, the errors in the given example are fixed by changing it to this:</p>
  
  <pre><code>export interface EventEmitter {
      addListener(event: string, listener: Function): EventEmitter;
      ...
  }
  </code></pre>
  
  <p>Although, this is not a solution to the actual problem.</p>