dashjs@3.0.0/build/typings/index.d.ts have 3 errors about "which lacks return-type annotation, implicitly has an 'any' return type"
Created by: gzlock
Environment
-
The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/ -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: None
- Dash.js version: dashjs@3.0.0
- Browser name/version: Not in browser
- OS name/version: Ubuntu 16.04.6 LTS
- node.js version: v12.10.0
- npm version: 6.10.3
- typescript version: 3.6.2
Steps to reproduce
Use travis-ci.org
The .travis.yml
language: node_js
node_js:
- node
matrix:
fast_finish: true
install:
- npm install
script:
- npm run build
cache:
directories:
- node_modules
The global.d.ts
import * as dashjs from 'dashjs'
declare global {
const dashjs: typeof dashjs
}
Console output
- Building for production...
Starting type checking service...
Using 1 worker with 2048MB memory limit
ERROR Failed to compile with 3 errors3:04:28 PM
error in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
ERROR in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
42:9 'setKeySystems', which lacks return-type annotation, implicitly has an 'any' return type.
40 | getSupportedKeySystemsFromContentProtection(cps: any[]): SupportedKeySystem[];
41 | getKeySystems(): KeySystem[];
> 42 | setKeySystems(keySystems: KeySystem[]);
| ^
43 | stop(): void;
44 | reset(): void;
45 | }
error in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
ERROR in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
296:9 'updateSettings', which lacks return-type annotation, implicitly has an 'any' return type.
294 | getAverageThroughput(value: number): void;
295 | getSettings(): MediaPlayerSettingClass;
> 296 | updateSettings(settings: MediaPlayerSettingClass);
| ^
297 | resetSettings(): void;
298 | }
299 |
error in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
ERROR in /home/travis/build/gzlock/danplayer/node_modules/dashjs/build/typings/index.d.ts
822:9 'getLatestBufferInfoVO', which lacks return-type annotation, implicitly has an 'any' return type.
820 | export interface DashMetrics {
821 | getCurrentRepresentationSwitch(type: 'video' | 'audio' | 'image', readOnly: boolean): ICurrentRepresentationSwitch;
> 822 | getLatestBufferInfoVO()
| ^
823 | getCurrentBufferLevel(type: 'video' | 'audio' | 'image', readOnly: boolean): number;
824 | getCurrentHttpRequest(type: 'video' | 'audio' | 'image', readOnly: boolean): object;
825 | getHttpRequests(type: 'video' | 'audio' | 'image'): object[];
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! danplayer@0.1.0 build: `cross-env TARGET=docs vue-cli-service build --fix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the danplayer@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2019-09-10T15_04_28_327Z-debug.log
The command "npm run build" exited with 1.