INNER CODE UNIT · TypeScript
idx
scribbletune/scribbletune · src/cli.ts:77
const idx = Number(digit) - 1;
if (idx < 0 || idx >= chordDegrees.length) {
throw new TypeError(
`Invalid progression digit "${digit}" in "${progDigits}"`
);
}
return chordDegrees[idx];
});
return { chordDegrees: romans.join(' '), raw: progDigits };
};
const parseProgression = (
root: string,
mode: string,
progressionInput: string
): string => {
if (progressionInput === 'random') {