title: Using typescript decorators to mandate a parameter in methods
body: <p>In a typescript project, there are about 2000+ events(methods) that are fired when user triggers an operation and when that operation get finished. So, for all the events that are triggered when an operation gets finished, I want to have some kind of performance metrics, so a parameter 'executionTime' should be mandatory.
  I am planning to add <strong>method decorator</strong> above all those events for which execution time must be present as a parameter. Below is my code</p>
  <pre><code>class AllEvents {
  
      @performanceDecorator()
      public static firstEvent(param1: string, param2: string, executionTime: number): void {
          //some tasks...
      }
  
      @performanceDecorator()
      public static secondEvent(param1: string, param2: string): void {
          //some tasks...
      }
  
      @performanceDecorator()
      public static thirdEvent(param1: string, param2: string, executionTime: number): void {
          //some tasks...
      }
  }
  
  function performanceDecorator(value: boolean) {
      //..................
  }
  </code></pre>
  <p>I am new to typescript, and not able to figure out the code that I should write in the body of <em>function performanceDecorator</em>, such that if some method does not have a parameter named 'executionTime', it will throw errors.</p>