From 244b4ae3973bc1511464a08158a123767f83179c Mon Sep 17 00:00:00 2001 From: BO41 Date: Thu, 18 Oct 2018 09:08:59 +0200 Subject: 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 --- .../+my-account/my-account-videos/my-account-videos.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'client/src/app/+my-account/my-account-videos/my-account-videos.component.ts') 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 } isInSelectionMode () { - return Object.keys(this.checkedVideos).some(k => this.checkedVideos[ k ] === true) + return Object.keys(this.checkedVideos).some((k: any) => 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 => this.checkedVideos[ k ] === true) + .filter((k: any) => this.checkedVideos[ k ] === true) .map(k => parseInt(k, 10)) const res = await this.confirmService.confirm( @@ -168,9 +168,10 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni } private spliceVideosById (id: number) { - for (const key of Object.keys(this.loadedPages)) { + let key: any + for (key of Object.keys(this.loadedPages)) { const videos = this.loadedPages[ key ] - const index = videos.findIndex(v => v.id === id) + const index = videos.findIndex((v: any) => v.id === id) if (index !== -1) { videos.splice(index, 1) -- cgit v1.2.3