]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
Better typings
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-videos / my-account-videos.component.ts
index 52307f09e763ab7cbe7d071e6b0fce9d7cf995b4..2d88ac760bc6254fb9e3a08d3432a4f23f7896d4 100644 (file)
@@ -66,7 +66,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
   }
 
   isInSelectionMode () {
-    return Object.keys(this.checkedVideos).some((k: any) => this.checkedVideos[ k ] === true)
+    return Object.keys(this.checkedVideos).some(k => this.checkedVideos[ k ] === true)
   }
 
   getVideosObservable (page: number) {
@@ -81,7 +81,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
 
   async deleteSelectedVideos () {
     const toDeleteVideosIds = Object.keys(this.checkedVideos)
-                                    .filter((k: any) => this.checkedVideos[ k ] === true)
+                                    .filter(k => this.checkedVideos[ k ] === true)
                                     .map(k => parseInt(k, 10))
 
     const res = await this.confirmService.confirm(
@@ -168,10 +168,9 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
   }
 
   private spliceVideosById (id: number) {
-    let key: any
-    for (key of Object.keys(this.loadedPages)) {
-      const videos = this.loadedPages[ key ]
-      const index = videos.findIndex((v: any) => v.id === id)
+    for (const key of Object.keys(this.loadedPages)) {
+      const videos: Video[] = this.loadedPages[ key ]
+      const index = videos.findIndex(v => v.id === id)
 
       if (index !== -1) {
         videos.splice(index, 1)