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/settings-menu-button.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/settings-menu-button.ts')
-rw-r--r-- | client/src/assets/player/settings-menu-button.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/client/src/assets/player/settings-menu-button.ts b/client/src/assets/player/settings-menu-button.ts index b51c52506..f0ccb5862 100644 --- a/client/src/assets/player/settings-menu-button.ts +++ b/client/src/assets/player/settings-menu-button.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // Author: Yanko Shterev | 1 | // Author: Yanko Shterev |
2 | // Thanks https://github.com/yshterev/videojs-settings-menu | 2 | // Thanks https://github.com/yshterev/videojs-settings-menu |
3 | 3 | ||
4 | import * as videojs from 'video.js' | 4 | const videojs = require('video.js') |
5 | import { SettingsMenuItem } from './settings-menu-item' | 5 | import { SettingsMenuItem } from './settings-menu-item' |
6 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' | 6 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' |
7 | import { toTitleCase } from './utils' | 7 | import { toTitleCase } from './utils' |
@@ -11,7 +11,7 @@ const Menu: VideoJSComponentInterface = videojsUntyped.getComponent('Menu') | |||
11 | const Component: VideoJSComponentInterface = videojsUntyped.getComponent('Component') | 11 | const Component: VideoJSComponentInterface = videojsUntyped.getComponent('Component') |
12 | 12 | ||
13 | class SettingsButton extends Button { | 13 | class SettingsButton extends Button { |
14 | constructor (player: videojs.Player, options) { | 14 | constructor (player: any, options: any) { |
15 | super(player, options) | 15 | super(player, options) |
16 | 16 | ||
17 | this.playerComponent = player | 17 | this.playerComponent = player |
@@ -48,7 +48,7 @@ class SettingsButton extends Button { | |||
48 | } | 48 | } |
49 | } | 49 | } |
50 | 50 | ||
51 | onDisposeSettingsItem (event, name: string) { | 51 | onDisposeSettingsItem (name: string) { |
52 | if (name === undefined) { | 52 | if (name === undefined) { |
53 | let children = this.menu.children() | 53 | let children = this.menu.children() |
54 | 54 | ||
@@ -74,7 +74,7 @@ class SettingsButton extends Button { | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | onAddSettingsItem (event, data) { | 77 | onAddSettingsItem (data: any) { |
78 | const [ entry, options ] = data | 78 | const [ entry, options ] = data |
79 | 79 | ||
80 | this.addMenuItem(entry, options) | 80 | this.addMenuItem(entry, options) |
@@ -120,7 +120,7 @@ class SettingsButton extends Button { | |||
120 | this.resetChildren() | 120 | this.resetChildren() |
121 | } | 121 | } |
122 | 122 | ||
123 | getComponentSize (element) { | 123 | getComponentSize (element: any) { |
124 | let width: number = null | 124 | let width: number = null |
125 | let height: number = null | 125 | let height: number = null |
126 | 126 | ||
@@ -178,7 +178,7 @@ class SettingsButton extends Button { | |||
178 | this.panelChild.addChild(this.menu) | 178 | this.panelChild.addChild(this.menu) |
179 | } | 179 | } |
180 | 180 | ||
181 | addMenuItem (entry, options) { | 181 | addMenuItem (entry: any, options: any) { |
182 | const openSubMenu = function () { | 182 | const openSubMenu = function () { |
183 | if (videojsUntyped.dom.hasClass(this.el_, 'open')) { | 183 | if (videojsUntyped.dom.hasClass(this.el_, 'open')) { |
184 | videojsUntyped.dom.removeClass(this.el_, 'open') | 184 | videojsUntyped.dom.removeClass(this.el_, 'open') |
@@ -218,7 +218,7 @@ class SettingsButton extends Button { | |||
218 | } | 218 | } |
219 | 219 | ||
220 | class SettingsPanel extends Component { | 220 | class SettingsPanel extends Component { |
221 | constructor (player: videojs.Player, options) { | 221 | constructor (player: any, options: any) { |
222 | super(player, options) | 222 | super(player, options) |
223 | } | 223 | } |
224 | 224 | ||
@@ -232,7 +232,7 @@ class SettingsPanel extends Component { | |||
232 | } | 232 | } |
233 | 233 | ||
234 | class SettingsPanelChild extends Component { | 234 | class SettingsPanelChild extends Component { |
235 | constructor (player: videojs.Player, options) { | 235 | constructor (player: any, options: any) { |
236 | super(player, options) | 236 | super(player, options) |
237 | } | 237 | } |
238 | 238 | ||
@@ -246,7 +246,7 @@ class SettingsPanelChild extends Component { | |||
246 | } | 246 | } |
247 | 247 | ||
248 | class SettingsDialog extends Component { | 248 | class SettingsDialog extends Component { |
249 | constructor (player: videojs.Player, options) { | 249 | constructor (player: any, options: any) { |
250 | super(player, options) | 250 | super(player, options) |
251 | this.hide() | 251 | this.hide() |
252 | } | 252 | } |