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

fix(types): use typeof for registerComponent and registerPlugin #8451

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

mister-ben
Copy link
Contributor

Description

These accept and return the component/plugin class rather than an instance of the class. Currently, typescript will throw TS2345: Argument of type 'typeof MyComponent' is not assignable to parameter of type 'Component'. when registering a component.

Specific Changes proposed

jsdoc updates

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #8451 (8ef50d3) into main (d1c3bd3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #8451   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files         113      113           
  Lines        7589     7589           
  Branches     1826     1826           
=======================================
  Hits         6277     6277           
  Misses       1312     1312           
Files Coverage Δ
src/js/component.js 93.54% <ø> (ø)
src/js/player.js 90.90% <ø> (ø)
src/js/video.js 94.16% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@amtins amtins left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏽

@mister-ben mister-ben merged commit 2c36d25 into videojs:main Oct 3, 2023
8 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