aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/settings-menu-item.ts
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/assets/player/settings-menu-item.ts
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/assets/player/settings-menu-item.ts')
-rw-r--r--client/src/assets/player/settings-menu-item.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/client/src/assets/player/settings-menu-item.ts b/client/src/assets/player/settings-menu-item.ts
index 665ce6fc2..2d752b62e 100644
--- a/client/src/assets/player/settings-menu-item.ts
+++ b/client/src/assets/player/settings-menu-item.ts
@@ -1,7 +1,6 @@
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
4import * as videojs from 'video.js'
5import { toTitleCase } from './utils' 4import { toTitleCase } from './utils'
6import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' 5import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings'
7 6
@@ -10,7 +9,7 @@ const component: VideoJSComponentInterface = videojsUntyped.getComponent('Compon
10 9
11class SettingsMenuItem extends MenuItem { 10class SettingsMenuItem extends MenuItem {
12 11
13 constructor (player: videojs.Player, options, entry: string, menuButton: VideoJSComponentInterface) { 12 constructor (player: any, options: any, entry: string, menuButton: VideoJSComponentInterface) {
14 super(player, options) 13 super(player, options)
15 14
16 this.settingsButton = menuButton 15 this.settingsButton = menuButton
@@ -55,7 +54,7 @@ class SettingsMenuItem extends MenuItem {
55 this.transitionEndHandler = this.onTransitionEnd.bind(this) 54 this.transitionEndHandler = this.onTransitionEnd.bind(this)
56 } 55 }
57 56
58 onSubmenuClick (event) { 57 onSubmenuClick (event: any) {
59 let target = null 58 let target = null
60 59
61 if (event.type === 'tap') { 60 if (event.type === 'tap') {
@@ -150,7 +149,7 @@ class SettingsMenuItem extends MenuItem {
150 * 149 *
151 * @method PrefixedEvent 150 * @method PrefixedEvent
152 */ 151 */
153 PrefixedEvent (element, type, callback, action = 'addEvent') { 152 PrefixedEvent (element: any, type: any, callback: any, action = 'addEvent') {
154 let prefix = ['webkit', 'moz', 'MS', 'o', ''] 153 let prefix = ['webkit', 'moz', 'MS', 'o', '']
155 154
156 for (let p = 0; p < prefix.length; p++) { 155 for (let p = 0; p < prefix.length; p++) {
@@ -166,7 +165,7 @@ class SettingsMenuItem extends MenuItem {
166 } 165 }
167 } 166 }
168 167
169 onTransitionEnd (event) { 168 onTransitionEnd (event: any) {
170 if (event.propertyName !== 'margin-right') { 169 if (event.propertyName !== 'margin-right') {
171 return 170 return
172 } 171 }
@@ -229,7 +228,7 @@ class SettingsMenuItem extends MenuItem {
229 ) 228 )
230 } 229 }
231 230
232 update (event?: Event) { 231 update (event?: any) {
233 let target = null 232 let target = null
234 let subMenu = this.subMenu.name() 233 let subMenu = this.subMenu.name()
235 234