mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
19 lines
465 B
TypeScript
19 lines
465 B
TypeScript
|
import type { HabitHistory } from "./HabitHistory"
|
||
|
|
||
|
export interface HabitsTrackerOptions {
|
||
|
habitsHistory: HabitHistory[]
|
||
|
}
|
||
|
|
||
|
export class HabitsTracker implements HabitsTrackerOptions {
|
||
|
public habitsHistory: HabitHistory[]
|
||
|
|
||
|
public constructor(options: HabitsTrackerOptions) {
|
||
|
const { habitsHistory } = options
|
||
|
this.habitsHistory = habitsHistory
|
||
|
}
|
||
|
|
||
|
public static default(): HabitsTracker {
|
||
|
return new HabitsTracker({ habitsHistory: [] })
|
||
|
}
|
||
|
}
|