Skip to content

Commit

Permalink
fix(types): Remove unused Loader.loader property.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalton committed Apr 1, 2021
1 parent f20e155 commit fb1ead0
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
2 changes: 0 additions & 2 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1560,8 +1560,6 @@ export interface Loader<T extends LoaderContext> {
// (undocumented)
load(context: LoaderContext, config: LoaderConfiguration, callbacks: LoaderCallbacks<T>): void;
// (undocumented)
loader: any;
// (undocumented)
stats: LoaderStats;
}

Expand Down
36 changes: 34 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/types/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export interface Loader<T extends LoaderContext> {
): void;
getResponseHeader(name: string): string | null;
context: T;
loader: any;
stats: LoaderStats;
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/fetch-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FetchLoader implements Loader<LoaderContext> {
private config: LoaderConfiguration | null = null;
private callbacks: LoaderCallbacks<LoaderContext> | null = null;
public stats: LoaderStats;
public loader: Response | null = null;
private loader: Response | null = null;

constructor(config /* HlsConfig */) {
this.fetchSetup = config.fetchSetup || getRequest;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xhr-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class XhrLoader implements Loader<LoaderContext> {
private callbacks: LoaderCallbacks<LoaderContext> | null = null;
public context!: LoaderContext;

public loader: XMLHttpRequest | null = null;
private loader: XMLHttpRequest | null = null;
public stats: LoaderStats;

constructor(config /* HlsConfig */) {
Expand Down
1 change: 0 additions & 1 deletion tests/unit/loader/fragment-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const expect = chai.expect;

class MockXhr implements Loader<LoaderContext> {
context!: LoaderContext;
loader: any;
stats: LoadStats;
callbacks?: LoaderCallbacks<FragmentLoaderContext>;

Expand Down

0 comments on commit fb1ead0

Please sign in to comment.