Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper typing for getElementsByClass #238

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Proper typing for getElementsByClass #238

merged 1 commit into from
Mar 1, 2024

Conversation

mscuthbert
Copy link
Member

not yet implemented for recurse()...

When getElementsByClass is passed a single Music21 class, like m21p, now the elements of the StreamIterator will be properly typed.

Note that it does not yet work on recurse() -- I want to make sure that even this change doesn't break my projects first.

.pitches is moved from NotRest to GeneralNote to match recent changes in m21p.

Mixing strings and M21Object classes in lists to getElements calls is no longer allowed. Choose one or the other.

turn off eslint checking for dup methods. Typescript checks this for us, and eslint does not know about overload methods.

rewrite clef.bestClef with modern looping techniques, and taking advantage of the automatic typing. Add test, including recurse test.

not yet implemented for recurse()...

When getElementsByClass is passed a single Music21 class, like m21p, now the elements of the StreamIterator will be properly typed.

Note that it does not yet work on recurse() -- I want to make sure that even this change doesn't break my projects first.

.pitches is moved from NotRest to GeneralNote to match recent changes in m21p.

Mixing strings and M21Object classes in lists to getElements calls is no longer allowed.  Choose one or the other.

turn off eslint checking for dup methods.  Typescript checks this for us, and eslint does not know about overload methods.

rewrite clef.bestClef with modern looping techniques, and taking advantage of the automatic typing.  Add test, including recurse test.
@mscuthbert mscuthbert merged commit e2af74f into master Mar 1, 2024
2 checks passed
@mscuthbert mscuthbert deleted the m21j-typing branch March 1, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant