title: initialize all class attributes TypeScript
body: <p>There is a class with a set of properties of the same type. They are all going to be instances of another class. So I need to define them first and then initialize them inside of the constructor. Note: I cannot do that together with declaration because of $window module, which is available only on constuctor.</p>
  
  <p>I don't want to initialize them one-by-one, this is just a monkey job.</p>
  
  <p>This is my class:</p>
  
  <pre><code>  export class MyService {
      public signal1: Signal;
      public signal2: Signal;
      public signal3: Signal;
      public signal4: Signal;
      // ...
  
      /*@ngInject*/
      constructor($window: any) {
        this.signal1 = new $window.signals.Signal();
        this.signal2 = new $window.signals.Signal();
        this.signal3 = new $window.signals.Signal();
        this.signal4 = new $window.signals.Signal();
        // ...
      }
    }
  </code></pre>
  
  <p>TypeScript version: 1.4.1</p>
  
  <p>The question is: can I initialize all properties at once in the constructor without any code repetitions?</p>
  
  <p>Thank you in advance.</p>