Musical keyboard component written in React.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generateKeys.ts 241 B

12345678910
  1. interface GenerateKeys {
  2. (startKey: number, endKey: number): number[]
  3. }
  4. const generateKeys: GenerateKeys = (startKey, endKey) =>
  5. Array(endKey! - startKey! + 1)
  6. .fill(0)
  7. .map((_, i) => startKey! + i)
  8. export default generateKeys