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): Add has|usingPlugin to typedef #8811

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mister-ben
Copy link
Contributor

Description

tsc doesn't understand mixins and ignores jsdoc not followed by code. The jsdoc for the plugin methods usingPlugin() and hasPlugin() in Player are being ignored. To get them included in type outputs we need to have otherwise unnecessary stubs codes, as we already have for on() etc, which adds unnecessary, even if a small amount of, code to the outputs.

Specific Changes proposed

  • Slight refactor of Player to include those stubs.
  • Adds a rollup plugin to delete lines between certain comments, so those stubs are deleted from the outputs.

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

Copy link

codecov bot commented Jul 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.12%. Comparing base (e78bcc7) to head (17c2e29).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8811      +/-   ##
==========================================
+ Coverage   83.07%   83.12%   +0.05%     
==========================================
  Files         120      120              
  Lines        8022     8017       -5     
  Branches     1925     1925              
==========================================
  Hits         6664     6664              
+ Misses       1358     1353       -5     

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

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.

None yet

1 participant