-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Simplify chord shape types and improve code readability
- Loading branch information
1 parent
04a73a4
commit c44fe28
Showing
6 changed files
with
61 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
export type Fret = number | string; | ||
export type Finger = number | string; | ||
|
||
type ChordShape = { | ||
frets: (string | number)[]; | ||
fingers?: (number | 0)[]; | ||
fingersOpen?: (number | 0)[]; | ||
frets: Fret[]; | ||
fingers?: Finger[]; | ||
fingersOpen?: Finger[]; | ||
}; | ||
|
||
export type ChordShapeRefined = { | ||
frets: (string | number)[]; | ||
fingers: (number | 0)[]; | ||
frets: Fret[]; | ||
fingers: Finger[]; | ||
} | ||
|
||
export default ChordShape; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters