Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TS typings for KeyErrorEvent and KeySessionCreatedEvent error #4441

Merged

Conversation

kris-youview
Copy link
Contributor

@kris-youview kris-youview commented Mar 27, 2024

KeyErrorEvent is triggered with error (DashJSError) instead of data.

KeySystemSelectedEvent has incorrect error type: it's DashJSError as well instead of string.

As a result, KeyError type becomes redundant and can be removed.

Context

KeyErrorEvent is triggered here:
https://github.com/search?q=repo%3ADash-Industry-Forum%2Fdash.js+path%3A%2Fsrc%2Fstreaming%2Fprotection%2Fmodels%2F*+KEY_ERROR&type=code

KeySystemSelectedEvent is triggered here:
https://github.com/Dash-Industry-Forum/dash.js/blob/development/src/streaming/protection/controllers/ProtectionController.js#L249

@kris-youview
Copy link
Contributor Author

It seems like it may be worthwhile to also remove KeyError class which now becomes unused?

@kris-youview kris-youview force-pushed the kris/key-error-typings branch from ee8ab6d to 06827f5 Compare April 3, 2024 06:06
@kris-youview
Copy link
Contributor Author

It seems like it may be worthwhile to also remove KeyError class which now becomes unused?

Removed it as it seems unused now.

`KeyErrorEvent` is triggered with `error` (`DashJSError`) instead of `data`.

`KeySystemSelectedEvent` has incorrect `error` type:  it's `DashJSError`
as well instead of `string`.

As a result, `KeyError` type becomes redundant and can be removed.
@kris-youview kris-youview force-pushed the kris/key-error-typings branch from 06827f5 to eecb9cd Compare April 3, 2024 06:09
@dsilhavy dsilhavy added this to the 5.0.0 milestone Apr 3, 2024
@dsilhavy dsilhavy self-requested a review April 3, 2024 14:43
@dsilhavy dsilhavy merged commit 6180c75 into Dash-Industry-Forum:development Apr 4, 2024
3 checks passed
@kris-youview kris-youview deleted the kris/key-error-typings branch April 4, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants