onReady event target type is wrong after v8.1.0
esetnik opened this issue ยท 7 comments
esetnik commented
const handleReady: YouTubeProps['onReady'] = ({
target,
}: {
target: YT.Player;
}) => {
console.log('youtube player is ready', target, autoplay);
};
src/Components/YoutubePlayer.tsx:45:9 - error TS2322: Type '({ target, }: { target: YT.Player; }) => void' is not assignable to type '((event: CustomEvent<any>) => void) & (() => void)'.
Type '({ target, }: { target: YT.Player; }) => void' is not assignable to type '(event: CustomEvent<any>) => void'.
Types of parameters '__0' and 'event' are incompatible.
Type 'CustomEvent<any>' is not assignable to type '{ target: Player; }'.
Types of property 'target' are incompatible.
Type 'EventTarget | null' is not assignable to type 'Player'.
Type 'null' is not assignable to type 'Player'.
45 const handleReady: YouTubeProps['onReady'] = ({
ruisaraiva19 commented
@esetnik thanks for the report. I'll take a look into it later today!
github-actions commented
๐ This issue has been resolved in version react-youtube-v8.2.0-canary.2 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
github-actions commented
๐ This issue has been resolved in version react-youtube-v8.2.1-canary.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
github-actions commented
๐ This issue has been resolved in version react-youtube-v8.2.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
ruisaraiva19 commented
@esetnik Can you try using the latest version 8.2.1?
esetnik commented
@ruisaraiva19 looks great thanks!
ruisaraiva19 commented
@esetnik Awesome! ๐