diff options
author | BO41 <lukasw41@gmail.com> | 2018-10-18 09:08:59 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-10-18 09:08:59 +0200 |
commit | 244b4ae3973bc1511464a08158a123767f83179c (patch) | |
tree | 24f4399489167bc92921e3fe0c1c04a87d7c1161 /client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |
parent | 28e51e831bd121f063600a597d7b02f8fd846de9 (diff) | |
download | PeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.gz PeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.zst PeerTube-244b4ae3973bc1511464a08158a123767f83179c.zip |
NoImplicitAny flag true (#1157)
this enables the `noImplicitAny` flag in the Typescript compiler
> When the noImplicitAny flag is true and the TypeScript compiler cannot infer the type, it still generates the JavaScript files, but it also reports an error. Many seasoned developers prefer this stricter setting because type checking catches more unintentional errors at compile time.
closes: #1131
replaces #1137
Diffstat (limited to 'client/src/app/+my-account/my-account-videos/my-account-videos.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 7560f0128..52307f09e 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |||
@@ -66,7 +66,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni | |||
66 | } | 66 | } |
67 | 67 | ||
68 | isInSelectionMode () { | 68 | isInSelectionMode () { |
69 | return Object.keys(this.checkedVideos).some(k => this.checkedVideos[ k ] === true) | 69 | return Object.keys(this.checkedVideos).some((k: any) => this.checkedVideos[ k ] === true) |
70 | } | 70 | } |
71 | 71 | ||
72 | getVideosObservable (page: number) { | 72 | getVideosObservable (page: number) { |
@@ -81,7 +81,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni | |||
81 | 81 | ||
82 | async deleteSelectedVideos () { | 82 | async deleteSelectedVideos () { |
83 | const toDeleteVideosIds = Object.keys(this.checkedVideos) | 83 | const toDeleteVideosIds = Object.keys(this.checkedVideos) |
84 | .filter(k => this.checkedVideos[ k ] === true) | 84 | .filter((k: any) => this.checkedVideos[ k ] === true) |
85 | .map(k => parseInt(k, 10)) | 85 | .map(k => parseInt(k, 10)) |
86 | 86 | ||
87 | const res = await this.confirmService.confirm( | 87 | const res = await this.confirmService.confirm( |
@@ -168,9 +168,10 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni | |||
168 | } | 168 | } |
169 | 169 | ||
170 | private spliceVideosById (id: number) { | 170 | private spliceVideosById (id: number) { |
171 | for (const key of Object.keys(this.loadedPages)) { | 171 | let key: any |
172 | for (key of Object.keys(this.loadedPages)) { | ||
172 | const videos = this.loadedPages[ key ] | 173 | const videos = this.loadedPages[ key ] |
173 | const index = videos.findIndex(v => v.id === id) | 174 | const index = videos.findIndex((v: any) => v.id === id) |
174 | 175 | ||
175 | if (index !== -1) { | 176 | if (index !== -1) { |
176 | videos.splice(index, 1) | 177 | videos.splice(index, 1) |