My instructor recommended that I turn the class into an interface, as it is the correct way to do it.
export class Stats {
donePomodoros: number;
doneShortBreaks: number;
doneLongBreaks: number;
constructor() {
this.donePomodoros = 0;
this.doneShortBreaks = 0;
this.doneLongBreaks = 0;
}
}
However, when I converted it into an interface in the service, I encountered the following issue:
'Stats' only refers to a type, but is being used as a value here.
private observableStats: BehaviorSubject<Stats> = new BehaviorSubject(
new Stats()
);
How can I resolve this problem?