-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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): Minor fix for types #8466
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
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. |
While providing a function to |
Codecov Report
@@ Coverage Diff @@
## main #8466 +/- ##
=======================================
Coverage 82.71% 82.71%
=======================================
Files 113 113
Lines 7589 7589
Branches 1826 1826
=======================================
Hits 6277 6277
Misses 1312 1312
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The place we're using this is in the react unmount hook. Therefore there can't be any other events after that. If I recall correctly, the fn argument was optional in the past. That's why I made it optional now too. If you want to keep it required I can remove it and now I understand the reason. |
It probably should be optional, as that is the proper method signature. Just wanting to make sure you're using it properly because otherwise, it could cause problems :) |
Co-authored-by: mister-ben <[email protected]>
Re |
Thank you for looking into this. |
Outside observer here having run into the typing issues here as well. I think there may be a simpler solution for this that would avoid a refactor. I'm prototyping an idea I have in a fork and then can create a PR for description soon. |
Yup, you were right. That's what was needed. I have a PR I'm polishing up now that I hope to get created today. My company just needed audioTracks and videoTracks, but I'll add the textTracks and remote track stuff too so those on this thread needing it can get it in the same PR. I'll tag this PR. |
Just wanted to follow-up. Looks like I'll be getting this up tomorrow. I found some changes that were caused to the generated JS docs for the website that aren't good. So I need to do a little more polishing before submitting the PR. |
Apologies for the delay. An initial PR has been submitted. This doesn't address all the issues (just a minor subset for now). I wanted to get the low-hanging fruit done first and drive some conversation before more invasive changes can be explored. I hope the PR that I submitted and linked to this helps other TypeScript devs at least unblock themselves for the next steps though. |
Congrats on merging your first pull request! 🎉🎉🎉 |
Description
Hello! We're using videojs but since the upgrade to v8, we've ran into some typing issues that we had to patch with @ts-ignore and such.
This PR fixes the issues we had with the .off() function always requiring a second param for function and the issues we have with the videojs.getComponent('Component') not returning the right type.
I'm not sure how to build from the jsdoc into the .d.ts files to check that the generated types are correct but I think these changes might work.
I'd also like to help fixing the missing ".remoteTextTracks()" function on the Player type and the missing export for video player options but I don't know how. If you give me some pointers, I'd be glad to help with this
Specific Changes proposed
Requirements Checklist