title: How to pass on parameters from one function with variable amount of parameters to another with variable amount of parameters in typescript?
body: <p>This does not work</p>
  
  <pre><code>static myDebug(message: string, ...optionalParameters: any[]): void {
      // tslint:disable-next-line
      console.debug(message, optionalParameters);
  }
  </code></pre>
  
  <p>it just writes lines like this</p>
  
  <pre><code>test myDebug this.url = Array(2), windowId = %d
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>test myDebug this.url = /myurl, windowId = 123
  </code></pre>
  
  <p>In C this cannot be done so I need to do it like this:</p>
  
  <pre><code>    va_start(Args, Message);
      vsnprintf_s(Buffer, sizeof(Buffer), _TRUNCATE, Format, Args);
      va_end(Args);
      CallTheFunction(Buffer);
  </code></pre>