hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

chore: migrate NetworkDetails from any -> null|XMLHttpRequest|Response;

Open ondreian opened this issue 4 years ago • 1 comments

This PR will...

Properly declare the type for NetworkDetails

Why is this Pull Request needed?

Removes reliance on any type in favor of properly declaring NetworkDetails for better developer ergonomics when matching against HTTP outcomes

Are there any points in the code the reviewer needs to double check?

I traced the usage of NetworkDetails as best as possible to all existing usages in the codebase and found that in some cases it is declared as networkDetails? type and sometimes is is passed as a null object. I did not clean this up because technically it could be a breaking change, but converging it so that networkDetails? is preferred would make sense for code clarity and overall maintainability in the future.

Resolves issues:

resolves unnecessary dependence on any type

Checklist

  • [x] changes have been done against master branch, and PR does not conflict
  • [x] new unit / functional tests have been added (whenever applicable)
  • [x] API or design changes are documented in API.md

ondreian avatar Apr 27 '21 17:04 ondreian

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 16 '22 15:04 stale[bot]