Skip to content

Commit

Permalink
[#259] Remove builtin shaka-player types
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwebdev committed Oct 16, 2023
1 parent 3c98bc1 commit 33b7909
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"copy:rest": "yarn copyfiles -u 1 'src/**/*.md' lib",
"prepublishOnly": "if [ -z \"$CI\" ]; then echo \"Please use CI, do not publish manually\"; exit 1; fi",
"prerelease": "npm version prerelease --preid rc && yarn clean && yarn build && yarn copy && CI=1 npm publish --tag rc lib/",
"prepare": "node scripts/husky-install || node ../scripts/husky-install"
"prepare": "node scripts/husky-install || node ../scripts/husky-install",
"postinstall": "yarn clean"
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
Expand Down
3 changes: 2 additions & 1 deletion src/ebay-video/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { ReportButton } from './reportButton'

export function customControls(onReport = () => {}): { Report } {
// Have to contain in order to not execute until shaka is downloaded
const Report = class extends ui.Element {
// eslint-disable-next-line no-extra-parens
const Report = class extends (ui.Element as any) {
constructor(parent, controls, text) {
super(parent, controls)

Expand Down
12 changes: 9 additions & 3 deletions src/ebay-video/shaka-player.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// This is a stub until shaka provides proper types. Current shaka definitions are broken.
declare module 'shaka-player'
declare module 'shaka-player/dist/shaka-player.ui'
declare module 'shaka-player/dist/shaka-player.ui.debug'
declare module 'shaka-player' {
export = shaka;
}
declare module 'shaka-player/dist/shaka-player.ui' {
export = shaka;
}
declare module 'shaka-player/dist/shaka-player.ui.debug' {
export = shaka;
}

export type Player = Record<string, any>

0 comments on commit 33b7909

Please sign in to comment.