diff --git a/src/detectRepeats.test.ts b/src/detectRepeats.test.ts index 56f6d55..b02b577 100644 --- a/src/detectRepeats.test.ts +++ b/src/detectRepeats.test.ts @@ -35,6 +35,7 @@ describe("detectRepeats()", () => { { type: "Interval", duration: new Seconds(120), intensity: { from: 1, to: 1 }, comments: [] }, { type: "Rest", duration: new Seconds(60), intensity: { from: 0.5, to: 0.5 }, comments: [] }, ], + comments: [], }, ]); }); @@ -63,6 +64,7 @@ describe("detectRepeats()", () => { { type: "Interval", duration: new Seconds(60), intensity: { from: 1, to: 1 }, comments: [] }, { type: "Rest", duration: new Seconds(60), intensity: { from: 0.5, to: 0.5 }, comments: [] }, ], + comments: [], }, { type: "Rest", duration: new Seconds(120), intensity: { from: 0.2, to: 0.2 }, comments: [] }, { type: "Cooldown", duration: new Seconds(60), intensity: { from: 1, to: 0.5 }, comments: [] }, diff --git a/src/detectRepeats.ts b/src/detectRepeats.ts index 34e3740..a282629 100644 --- a/src/detectRepeats.ts +++ b/src/detectRepeats.ts @@ -1,9 +1,10 @@ import { equals } from "ramda"; -import { Interval } from "./ast"; +import { Interval, Comment } from "./ast"; export type RepeatedInterval = { times: number; intervals: Interval[]; + comments: Comment[]; }; const windowSize = 2; @@ -45,6 +46,7 @@ export const detectRepeats = (intervals: Interval[]): (Interval | RepeatedInterv processed.push({ times: repeats, intervals: reference, + comments: [], }); i += repeats * windowSize; } else {