-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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.
src/js/component.js
Outdated
* 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.
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.
🙇 Thanks, fixed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8545 +/- ##
==========================================
- Coverage 83.85% 83.16% -0.70%
==========================================
Files 120 120
Lines 8097 8108 +11
Branches 1944 1944
==========================================
- Hits 6790 6743 -47
- Misses 1307 1365 +58 ☔ View full report in Codecov by Sentry. |
@mister-ben updated! Sorry I missed the comments |
I don't have access to see why netlify is failing, can you post logs? |
not sure netlify failed, I retried it and it worked: https://deploy-preview-8545--videojs-docs.netlify.app/ |
Anything missing to get this merged? |
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