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/assets/player/resolution-menu-item.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/assets/player/resolution-menu-item.ts')
-rw-r--r-- | client/src/assets/player/resolution-menu-item.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/assets/player/resolution-menu-item.ts b/client/src/assets/player/resolution-menu-item.ts index 0ab0f53b5..afe490abb 100644 --- a/client/src/assets/player/resolution-menu-item.ts +++ b/client/src/assets/player/resolution-menu-item.ts | |||
@@ -1,10 +1,9 @@ | |||
1 | import * as videojs from 'video.js' | ||
2 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' | 1 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' |
3 | 2 | ||
4 | const MenuItem: VideoJSComponentInterface = videojsUntyped.getComponent('MenuItem') | 3 | const MenuItem: VideoJSComponentInterface = videojsUntyped.getComponent('MenuItem') |
5 | class ResolutionMenuItem extends MenuItem { | 4 | class ResolutionMenuItem extends MenuItem { |
6 | 5 | ||
7 | constructor (player: videojs.Player, options) { | 6 | constructor (player: any, options: any) { |
8 | const currentResolutionId = player.peertube().getCurrentResolutionId() | 7 | const currentResolutionId = player.peertube().getCurrentResolutionId() |
9 | options.selectable = true | 8 | options.selectable = true |
10 | options.selected = options.id === currentResolutionId | 9 | options.selected = options.id === currentResolutionId |
@@ -18,7 +17,7 @@ class ResolutionMenuItem extends MenuItem { | |||
18 | player.peertube().on('autoResolutionUpdate', () => this.updateSelection()) | 17 | player.peertube().on('autoResolutionUpdate', () => this.updateSelection()) |
19 | } | 18 | } |
20 | 19 | ||
21 | handleClick (event) { | 20 | handleClick (event: any) { |
22 | if (this.id === -1 && this.player_.peertube().isAutoResolutionForbidden()) return | 21 | if (this.id === -1 && this.player_.peertube().isAutoResolutionForbidden()) return |
23 | 22 | ||
24 | super.handleClick(event) | 23 | super.handleClick(event) |