diff --git a/package.json b/package.json index 8beccb063471..8a625a4affe5 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@types/google.maps": "^3.54.10", - "@types/youtube": "^0.0.50", + "@types/youtube": "^0.1.0", "rxjs": "^6.6.7", "rxjs-tslint-rules": "^4.34.8", "tslib": "^2.3.1", diff --git a/src/youtube-player/package.json b/src/youtube-player/package.json index 0d9614e61c4c..bac679e02343 100644 --- a/src/youtube-player/package.json +++ b/src/youtube-player/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/angular/components/tree/main/src/youtube-player#readme", "dependencies": { - "@types/youtube": "^0.0.50", + "@types/youtube": "^0.1.0", "tslib": "0.0.0-TSLIB" }, "peerDependencies": { diff --git a/src/youtube-player/youtube-player.ts b/src/youtube-player/youtube-player.ts index 0d3bd9febf93..665ae54b90f3 100644 --- a/src/youtube-player/youtube-player.ts +++ b/src/youtube-player/youtube-player.ts @@ -689,10 +689,10 @@ export class YouTubePlayer implements AfterViewInit, OnChanges, OnDestroy { switchMap(player => { return player ? fromEventPattern( - (listener: (event: T) => void) => { + listener => { player.addEventListener(name, listener); }, - (listener: (event: T) => void) => { + listener => { // The API seems to throw when we try to unbind from a destroyed player and it doesn't // expose whether the player has been destroyed so we have to wrap it in a try/catch to // prevent the entire stream from erroring out. diff --git a/yarn.lock b/yarn.lock index 85f58f1a75c7..4e36a09852bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4242,10 +4242,10 @@ dependencies: "@types/node" "*" -"@types/youtube@^0.0.50": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@types/youtube/-/youtube-0.0.50.tgz#c28cefde8e3f17ac3564bd83952eacf806d96eea" - integrity sha512-d4GpH4uPYp9W07kc487tiq6V/EUHl18vZWFMbQoe4Sk9LXEWzFi/BMf9x7TI4m7/j7gU3KeX8H6M8aPBgykeLw== +"@types/youtube@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@types/youtube/-/youtube-0.1.0.tgz#0e116bd0a8ddb93daf1372fb5e07f576cf9fe5cc" + integrity sha512-Pg33m3X2mFgdmhtvzOlAfUfgOa3341N3/2JCrVY/mXVxb4hagcqqEG6w4vGCfB64StQNWHSj/T8Eotb1Rko/FQ== "@typescript-eslint/types@4.33.0": version "4.33.0"