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

Type minimap container as optional #3387

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

cmorbitzer
Copy link
Contributor

Makes the minimap option container optional.

In the options passed to MinimapPlugin.create(), the container option is optional. However, the typing has it set as required. Not including it resulted in the TypeScript error TS2345: Argument of type {} is not assignable to parameter of type MinimapPluginOptions. Property container is missing in type {} but required in type WaveSurferOptions. This PR removes that error since the option is not required, and in fact, the minimap code handles the case where container is undefined.

The previous workaround was to coerce the typing: MinimapPlugin.create({} as MinimapPluginOptions)

Checklist

  • This PR is covered by e2e tests
  • It introduces no breaking API changes

Copy link
Owner

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@katspaugh katspaugh merged commit bd5c231 into katspaugh:main Dec 8, 2023
2 checks passed
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.

2 participants