aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
authorBO41 <lukasw41@gmail.com>2018-10-18 09:08:59 +0200
committerRigel Kent <par@rigelk.eu>2018-10-18 09:08:59 +0200
commit244b4ae3973bc1511464a08158a123767f83179c (patch)
tree24f4399489167bc92921e3fe0c1c04a87d7c1161 /client/src/app/shared/video
parent28e51e831bd121f063600a597d7b02f8fd846de9 (diff)
downloadPeerTube-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/shared/video')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts6
-rw-r--r--client/src/app/shared/video/video-edit.model.ts3
-rw-r--r--client/src/app/shared/video/video-feed.component.ts2
-rw-r--r--client/src/app/shared/video/video.service.ts2
4 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 1f43f974c..87814d4ba 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -27,7 +27,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
27 sort: VideoSortField = '-publishedAt' 27 sort: VideoSortField = '-publishedAt'
28 categoryOneOf?: number 28 categoryOneOf?: number
29 defaultSort: VideoSortField = '-publishedAt' 29 defaultSort: VideoSortField = '-publishedAt'
30 syndicationItems = [] 30 syndicationItems: any = []
31 31
32 loadOnInit = true 32 loadOnInit = true
33 marginContent = true 33 marginContent = true
@@ -59,7 +59,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
59 private resizeSubscription: Subscription 59 private resizeSubscription: Subscription
60 60
61 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}> 61 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}>
62 abstract generateSyndicationList () 62 abstract generateSyndicationList (): any
63 63
64 get user () { 64 get user () {
65 return this.authService.getUser() 65 return this.authService.getUser()
@@ -209,7 +209,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
209 } 209 }
210 210
211 protected setNewRouteParams () { 211 protected setNewRouteParams () {
212 const paramsObject = this.buildRouteParams() 212 const paramsObject: any = this.buildRouteParams()
213 213
214 const queryParams = Object.keys(paramsObject).map(p => p + '=' + paramsObject[p]).join('&') 214 const queryParams = Object.keys(paramsObject).map(p => p + '=' + paramsObject[p]).join('&')
215 this.location.replaceState(this.currentRoute, queryParams) 215 this.location.replaceState(this.currentRoute, queryParams)
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts
index 0046be964..a62277e04 100644
--- a/client/src/app/shared/video/video-edit.model.ts
+++ b/client/src/app/shared/video/video-edit.model.ts
@@ -25,6 +25,7 @@ export class VideoEdit implements VideoUpdate {
25 uuid?: string 25 uuid?: string
26 id?: number 26 id?: number
27 scheduleUpdate?: VideoScheduleUpdate 27 scheduleUpdate?: VideoScheduleUpdate
28 [key: string]: any
28 29
29 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) { 30 constructor (video?: Video & { tags: string[], commentsEnabled: boolean, support: string, thumbnailUrl: string, previewUrl: string }) {
30 if (video) { 31 if (video) {
@@ -49,7 +50,7 @@ export class VideoEdit implements VideoUpdate {
49 } 50 }
50 } 51 }
51 52
52 patch (values: Object) { 53 patch (values: any) {
53 Object.keys(values).forEach((key) => { 54 Object.keys(values).forEach((key) => {
54 this[ key ] = values[ key ] 55 this[ key ] = values[ key ]
55 }) 56 })
diff --git a/client/src/app/shared/video/video-feed.component.ts b/client/src/app/shared/video/video-feed.component.ts
index 6922153c0..be6c80c3f 100644
--- a/client/src/app/shared/video/video-feed.component.ts
+++ b/client/src/app/shared/video/video-feed.component.ts
@@ -6,5 +6,5 @@ import { Component, Input } from '@angular/core'
6 templateUrl: './video-feed.component.html' 6 templateUrl: './video-feed.component.html'
7}) 7})
8export class VideoFeedComponent { 8export class VideoFeedComponent {
9 @Input() syndicationItems 9 @Input() syndicationItems: any
10} 10}
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 724a0bde9..6283cf84d 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -276,7 +276,7 @@ export class VideoService implements VideosProvider {
276 return this.authHttp 276 return this.authHttp
277 .get(environment.apiUrl + descriptionPath) 277 .get(environment.apiUrl + descriptionPath)
278 .pipe( 278 .pipe(
279 map(res => res[ 'description' ]), 279 map((res: any) => res[ 'description' ]),
280 catchError(err => this.restExtractor.handleError(err)) 280 catchError(err => this.restExtractor.handleError(err))
281 ) 281 )
282 } 282 }