TS2351

This expression is not constructable. Type 'EMA' has no construct signatures.

Broken Code ❌

RSI.ts
export class RSI {
  private readonly avgGain: MovingAverage;
 
  constructor(
    private readonly interval: number,
    Indicator: EMA
  ) {
    this.avgGain = new Indicator(this.interval);
  }
}
EMA.ts
export class EMA {}

Fixed Code ✔️

RSI.ts
export class RSI {
  private readonly avgGain: MovingAverage;
 
  constructor(
    private readonly interval: number,
    Indicator: typeof EMA
  ) {
    this.avgGain = new Indicator(this.interval);
  }
}