You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to use functions and properties with generic typings like "object" and "any"
Observed behavior
It is not possible to access the returned values directly, it is always required to cast which costs significant resources on low end TV sets as well as the developer cannot be sure that the casted values and types are correct.
There must be no generic typing used as this will annul the type safety of Typescript. Required casts cost resources on low end devices. With correct typing the developer is always sure to process data in the correct way.
My personal important typing requested to be implement:
Return value is completely untyped and is a nested object
I tried to update the index.d.ts as far as possible, but you should have a full review on this especially as I do not know which parameter can be optional. I also like to recommend that you revise the Typescript typing in general not to have generic types offered anymore.
Environment
Steps to reproduce
Observed behavior
It is not possible to access the returned values directly, it is always required to cast which costs significant resources on low end TV sets as well as the developer cannot be sure that the casted values and types are correct.
Examples:
getStreamsFromManifest(manifest: object): StreamInfo[];
getSupportedKeySystemsFromContentProtection(cps: object[]): object[];
getEventsForPeriod(period: Period): any[];
Expected behavior
There must be no generic typing used as this will annul the type safety of Typescript. Required casts cost resources on low end devices. With correct typing the developer is always sure to process data in the correct way.
My personal important typing requested to be implement:
export interface QualityInfo { absoluteIndex: number; bitrate: number; height: number; isTopBitrate: boolean; mediaInfo: MediaInfo; mediaInfoIndex: number; qualityIndex: number; representationId: string; scanType: string; width: number; }
I tried to update the index.d.ts as far as possible, but you should have a full review on this especially as I do not know which parameter can be optional. I also like to recommend that you revise the Typescript typing in general not to have generic types offered anymore.
Adapted index.d.ts: https://github.com/Dash-Industry-Forum/dash.js/files/11624486/index.d.ts.zip
The text was updated successfully, but these errors were encountered: