title: TypeScript method decorator -- `this` with noImplicitThis enabled
body: <p>I'm trying to write a simple method decorator, that does some simple logic before calling the original method. All the examples I could find boil down to calling <code>originalMethod.apply(this, args)</code> at the end -- but with <code>noImplicitThis</code> enabled in <code>tsconfig.json</code>, I get the following error:</p>
  
  <pre><code>[eval].ts(1,224): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
  </code></pre>
  
  <p>I tried working around by calling <code>originalMethod.apply(this as any, args)</code>, but the error persists.</p>
  
  <p><strong>Question:</strong> Are there any workarounds to call the original method, <strong>without</strong> disabling <code>noImplicitThis</code> for the whole project?</p>
  
  <hr>
  
  <p>Minimal example -- works with <code>noImplicitAny</code> disabled:</p>
  
  <pre><code>function logBeforeCall1(): originalMethodDecorator {
      return function(
          target: any,
          propertyKey: string | symbol,
          descriptor: PropertyDescriptor,
      ): PropertyDescriptor {
          const originalMethod = descriptor.value;
          descriptor.value = (...args: any[]) =&gt; {
              console.log('hello!');
              return originalMethod.apply(this, args);
          };
          return descriptor;
      };
  }
  
  class Test1 {
      private num: number = 1;
  
      @logBeforeCall1()
      test(next: number): void {
          console.log(this.num, '-&gt;', next);
          this.num = next;
      }
  }
  </code></pre>
  
  <hr>
  
  <ul>
  <li>I already know that decorators don't have access to a specific object instance (see e.g. <a href="https://stackoverflow.com/questions/48217146/typescript-method-decorator">this question</a>), but using <code>this</code> in the above example works</li>
  <li>Event the official docs on decorators use the construction from my example (see the <a href="https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators" rel="noreferrer">Property Decorators section</a>), so it <em>works</em>, but conflicts with <code>noImplicitThis</code> compiler option...</li>
  </ul>