Skip to content

fix(component.js): Updated JS Doc for removeChild()#9070

Merged
heff merged 2 commits intovideojs:mainfrom
dds05:update/jsdoc
Jul 12, 2025
Merged

fix(component.js): Updated JS Doc for removeChild()#9070
heff merged 2 commits intovideojs:mainfrom
dds05:update/jsdoc

Conversation

@dds05
Copy link
Contributor

@dds05 dds05 commented Jul 12, 2025

Description

removeChild() in component.js was missing the string as an acceptable parameter due to which ts complaints.

Example : player.removeChild('controlBar');

Error : Argument of type 'string' is not assignable to parameter of type 'Component'

Specific Changes proposed

  1. Added string in the jsdoc for removeChild() in component.ts.
  2. Updated comment for removeChild().

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)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

@welcome
Copy link

welcome bot commented Jul 12, 2025

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

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.

@dds05
Copy link
Contributor Author

dds05 commented Jul 12, 2025

@gkatsev / @alex-barstow / @heff / @mister-ben Can you please review this?

@heff heff changed the title fix(component.js) : Updated JS Doc for removeChild() fix(component.js): Updated JS Doc for removeChild() Jul 12, 2025
@codecov
Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.31%. Comparing base (09eb715) to head (6803f93).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9070      +/-   ##
==========================================
- Coverage   84.89%   84.31%   -0.58%     
==========================================
  Files         120      120              
  Lines        8154     8154              
  Branches     1964     1964              
==========================================
- Hits         6922     6875      -47     
- Misses       1232     1279      +47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@heff heff merged commit 31f8d7c into videojs:main Jul 12, 2025
9 of 13 checks passed
@welcome
Copy link

welcome bot commented Jul 12, 2025

Congrats on merging your first pull request! 🎉🎉🎉

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