rep: work with better layout types

master
Rob Pilling 2024-03-16 13:09:58 +00:00
parent 030765d409
commit 1ed92b08f4
1 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ const layout = new L({
] ]
} }
] ]
}, {lazy: true}); } as const, {lazy: true});
class State { class State {
paused: boolean = true; paused: boolean = true;
@ -248,7 +248,7 @@ class State {
} }
} }
const repToLabel = (i: number, id: string) => { const repToLabel = (i: number, id: "cur" | "next") => {
const rep = reps[i]; const rep = reps[i];
if(rep) if(rep)
layout[`${id}_name`]!.label = `${rep.label} / ${msToMinSec(rep.dur)}`; layout[`${id}_name`]!.label = `${rep.label} / ${msToMinSec(rep.dur)}`;
@ -256,7 +256,7 @@ const repToLabel = (i: number, id: string) => {
emptyLabel(id); emptyLabel(id);
}; };
const emptyLabel = (id: string) => { const emptyLabel = (id: "cur" | "next") => {
layout[`${id}_name`]!.label = "<none> / 0m"; layout[`${id}_name`]!.label = "<none> / 0m";
}; };