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

feat: generate Typescript definitions #7954

Merged
merged 10 commits into from
Nov 21, 2022
Merged

feat: generate Typescript definitions #7954

merged 10 commits into from
Nov 21, 2022

Conversation

gjanblaszczyk
Copy link
Member

@gjanblaszczyk gjanblaszczyk commented Oct 9, 2022

Description

Generate Typescript definitions based on JSDoc comments.

TODO:

  • The ready callback in videojs() should be optional.

Specific Changes proposed

Improves player config to handle the generating of Typescript definitions during the build process.

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

@gjanblaszczyk gjanblaszczyk marked this pull request as draft October 9, 2022 17:09
@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Merging #7954 (9d2002e) into next (b5fefde) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             next    #7954      +/-   ##
==========================================
+ Coverage   81.96%   81.97%   +0.01%     
==========================================
  Files         111      110       -1     
  Lines        7356     7329      -27     
  Branches     1776     1767       -9     
==========================================
- Hits         6029     6008      -21     
+ Misses       1327     1321       -6     
Impacted Files Coverage Δ
src/js/component.js 94.11% <ø> (ø)
src/js/fullscreen-api.js 100.00% <ø> (ø)
src/js/menu/menu-keys.js 33.33% <ø> (ø)
src/js/player.js 89.76% <ø> (ø)
src/js/resize-manager.js 77.08% <ø> (ø)
src/js/tech/html5.js 66.94% <ø> (ø)
src/js/tech/tech.js 83.71% <ø> (ø)
src/js/video.js 94.06% <ø> (-0.05%) ⬇️
src/js/event-target.js 100.00% <100.00%> (+4.25%) ⬆️
src/js/tracks/html-track-element.js 100.00% <100.00%> (ø)
... and 1 more

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

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

This is cool and would be nice to have up-to-date types.

package.json Show resolved Hide resolved
src/js/event-target.js Show resolved Hide resolved
@gjanblaszczyk
Copy link
Member Author

gjanblaszczyk commented Oct 16, 2022

@gkatsev Should I add some additional changes for docs (guides, readme)?

@gjanblaszczyk gjanblaszczyk marked this pull request as ready for review October 16, 2022 21:10
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

I don't think any of the existing jsdocs need updating unless you wanted to do so. Can also be a separate effort/done on a case-by-case basis.

tsconfig.json Outdated Show resolved Hide resolved
@misteroneill misteroneill merged commit 7d5fe88 into next Nov 21, 2022
@misteroneill misteroneill deleted the feat/typescript branch November 21, 2022 22:11
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants