diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
commit | c199c427d4ae586339822320f20f512a7a19dc3f (patch) | |
tree | 9cbe8bebc25e97d2e8086c41bcd7180dd752dbac /client/src/assets/player/settings-menu-item.ts | |
parent | cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d (diff) | |
download | PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.gz PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.zst PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.zip |
Better typings
Diffstat (limited to 'client/src/assets/player/settings-menu-item.ts')
-rw-r--r-- | client/src/assets/player/settings-menu-item.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/assets/player/settings-menu-item.ts b/client/src/assets/player/settings-menu-item.ts index 2d752b62e..698f4627a 100644 --- a/client/src/assets/player/settings-menu-item.ts +++ b/client/src/assets/player/settings-menu-item.ts | |||
@@ -1,6 +1,10 @@ | |||
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 | // FIXME: something weird with our path definition in tsconfig and typings | ||
5 | // @ts-ignore | ||
6 | import * as videojs from 'video.js' | ||
7 | |||
4 | import { toTitleCase } from './utils' | 8 | import { toTitleCase } from './utils' |
5 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' | 9 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' |
6 | 10 | ||
@@ -9,7 +13,7 @@ const component: VideoJSComponentInterface = videojsUntyped.getComponent('Compon | |||
9 | 13 | ||
10 | class SettingsMenuItem extends MenuItem { | 14 | class SettingsMenuItem extends MenuItem { |
11 | 15 | ||
12 | constructor (player: any, options: any, entry: string, menuButton: VideoJSComponentInterface) { | 16 | constructor (player: videojs.Player, options: any, entry: string, menuButton: VideoJSComponentInterface) { |
13 | super(player, options) | 17 | super(player, options) |
14 | 18 | ||
15 | this.settingsButton = menuButton | 19 | this.settingsButton = menuButton |
@@ -229,7 +233,7 @@ class SettingsMenuItem extends MenuItem { | |||
229 | } | 233 | } |
230 | 234 | ||
231 | update (event?: any) { | 235 | update (event?: any) { |
232 | let target = null | 236 | let target: HTMLElement = null |
233 | let subMenu = this.subMenu.name() | 237 | let subMenu = this.subMenu.name() |
234 | 238 | ||
235 | if (event && event.type === 'tap') { | 239 | if (event && event.type === 'tap') { |