Skip to content

Commit

Permalink
Tickable.addModifier() has the same API as Note.addModifier() to avoid
Browse files Browse the repository at this point in the history
unnecessary casts.
  • Loading branch information
ronyeh committed Jan 30, 2022
1 parent 3f1bb51 commit d59cff5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ export abstract class Note extends Tickable {
}
modifier.setNote(this);
modifier.setIndex(index);
super.addModifier(modifier, index);
super.addModifier(modifier);
return this;
}

Expand Down
7 changes: 3 additions & 4 deletions src/tickable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,11 @@ export abstract class Tickable extends Element {

/**
* Optional, if tickable has modifiers, associate a Modifier.
* @param index ignored
* @param mod the modifier
*/
// eslint-disable-next-line
addModifier(mod: Modifier, index: number = 0): this {
this.modifiers.push(mod);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
addModifier(modifier: Modifier, index: number = 0): this {
this.modifiers.push(modifier);
this._preFormatted = false;
return this;
}
Expand Down

0 comments on commit d59cff5

Please sign in to comment.