mirror of
https://github.com/videojs/video.js.git
synced 2024-12-23 02:04:34 +02:00
820ef382bc
## 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. * Applies those comments to the `on()` etc stubs in Component and the new plugin stubs in Player. Any code surrounded by these comments, and the comments themselves, is deleted from the dist and test builds: ```js /* start-delete-from-build */ console.log('hi'); /* start-delete-from-build */ ``` Compared to main, video.min.js is 53 bytes smaller. ## 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](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0)) - [ ] 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 |
||
---|---|---|
.. | ||
docs/styles | ||
assets.js | ||
current-changelog.js | ||
docs-only.js | ||
fix-api-docs.js | ||
jsdoc-typeof-plugin.js | ||
jsdoc-workarounds.js | ||
license-header.txt | ||
minify.js | ||
netlify-docs.js | ||
netlify.js | ||
rollup-exclude-lines.js | ||
sandbox.js | ||
test-a11y.js | ||
translations.js |