-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add TypeScript typings #29
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legend
types/jwplayer-react.d.ts
Outdated
@@ -99,7 +98,7 @@ declare module '@jwplayer/jwplayer-react' { | |||
config?: JWPlayerConfig; | |||
} | |||
|
|||
const JWPlayerComponent = React.Component<JWPlayerProps & React.HTMLProps<'video'>>; | |||
const JWPlayerComponent: ComponentType<JWPlayerProps & HTMLProps<'video'>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use HTMLProps<HTMLVideoElement>
instead of HTMLProps<'video'>>
?
The latter will hardly pick all the relevant types for a video element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amowu could you please update? Would be awesome to make this available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment
Minor update needed to See #28 |
This PR will...
Add
@jwplayer/jwplayer-react
TypeScript typesWhy is this Pull Request needed?
Cannot find module '@jwplayer/jwplayer-react' or its corresponding type declarations.
Are there any points in the code the reviewer needs to double check?
After
npm publish
, you can use tools like CodeSandbox to create a React TypeScript project to check whetherimport JWPlayer from '@jwplayer/jwplayer-react'
will still display this error message.Are there any Pull Requests open in other repos which need to be merged with this?
N/A
Addresses Issue(s):
#4