-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix: improve types and allow augmentation #8545
base: main
Are you sure you want to change the base?
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that looks like a decent addition to its types.
* The `Component` class to register. | ||
* | ||
* @return {Component} | ||
* @return {C} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8545 +/- ##
==========================================
- Coverage 83.07% 82.98% -0.09%
==========================================
Files 120 120
Lines 8022 8033 +11
Branches 1925 1925
==========================================
+ Hits 6664 6666 +2
- Misses 1358 1367 +9 ☔ View full report in Codecov by Sentry. |
Description
Fix a few types in
player
andplugin
and allow typescript module augmentation soplugins
can modify the players type as expected.Specific Changes proposed
For type fixes, I used similar patterns found elsewhere in the codebase, just applied following the same pattern. For module augmentation, this pattern should be used:
Ideally one wouldn't need to reach into
dist
but I'm unable to do that without created a named export ofPlayer
onvideo.js
which I didn't think was wanted. Happy to make the change though. JSDoc seems to prevent me from only exporting thetype
of Player without exporting the whole class as well.Requirements Checklist