-
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): Improve Typescript coverage #8148
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8148 +/- ##
==========================================
- Coverage 82.02% 81.97% -0.06%
==========================================
Files 110 110
Lines 7344 7351 +7
Branches 1773 1773
==========================================
+ Hits 6024 6026 +2
- Misses 1320 1325 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I say if it improves things. |
I tested the PR locally. It resolves the original TypeScript issue for me that I reported in #8109. 👍 Thanks! |
Thanks for confirming @jdufresne! |
Is there a viable example of this library (video.js) in Angular 15, yet? Thanks in advance. |
The workaround should be to set |
Yeah. I did that workaround... Any idea when the Angular-friendly update will release? |
@LeeWhite187 +1 |
Yup, totally get it. It's not an ideal workaround. We're considering the next steps for improved types support. |
No worries. Thanks for the workaround in the meantime. |
Updates to JSDOC, and to the Component constructor to improve the typescript definitions output. Hopefully addresses #8109 and #8141.
{EventTarget~Event}
syntax and produces broken output when it's encountered (type would end up as{EventTarget}
but it also unexpectedly turns optional params into required params). These have had to be simplified to unscoped types.on
etc) to Component. Typescript doesn't support Typescript's@mixes
/@mixin
and I've not found another way to get these included in the output other than having the methods present by default. These will be replaced or set to undefined. This approach doesn't seem great. I'm hoping there's a better alternative I'm missing here.Unresolved
videojs.VERSION
.videojs.Vhs
getComponent()
can be used as a contructor.Reference
https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html