title: How to constructor a class with one generic type and other base types v typescript
body: <p>I have a problem how to create a constructor for a class if I have multiple types and one of them is generic.</p>
  <pre><code>export interface IResultModel&lt;T&gt; {
  
      EventType : string;
      Process : string;
      Service : string;
      Alert : string;
      IsSuccess : boolean;
      Message : string;
      Data : T;
  }
  
  export class ResultModel&lt;T&gt; implements IResultModel&lt;T&gt; {
  
      EventType : string = '';
      Process : string = '';
      Service : string = '';
      Alert : string = '';
      IsSuccess : boolean = false;
      Message : string = '';
      Data : T  // how to initialize ;
  
  
      constructor(initializer?: IResultModel&lt;T&gt;) {
          if (!initializer) return;
          
          if (initializer.EventType) this.EventType = initializer.EventType;
          if (initializer.Process) this.Process = initializer.Process;
          if (initializer.Service) this.Service = initializer.Service;
          if (initializer.Alert) this.Alert = initializer.Alert;
          if (initializer.IsSuccess) this.IsSuccess = initializer.IsSuccess;
          if (initializer.Message) this.Message = initializer.Message;
          if (initializer.Data) this.Data = initializer.Data; // how to instantiate a generic type
      }
  }
  </code></pre>
  <p>It is not clear to me how to initialize a generic data type and create an instance of the generic type in the constructor.</p>