Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public constructor(
source: NodeJS.ReadableStream,
getter: ReadableStreamGetter,
offset: number,
count: number,
options: RetriableReadableStreamOptions = {}
) {
super();
const aborter = options.abortSignal || AbortSignal.none;
this.aborter = aborter;
this.getter = getter;
this.source = source;
this.start = offset;
this.offset = offset;
this.end = offset + count - 1;
this.maxRetryRequests =
options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;
this.onProgress = options.onProgress;
this.options = options;
aborter.addEventListener("abort", this.abortHandler);
this.setSourceDataHandler();
this.setSourceEndHandler();
this.setSourceErrorHandler();
public constructor(
source: NodeJS.ReadableStream,
getter: ReadableStreamGetter,
offset: number,
count: number,
options: RetriableReadableStreamOptions = {}
) {
super();
this.aborter = options.abortSignal || AbortSignal.none;
this.getter = getter;
this.source = source;
this.start = offset;
this.offset = offset;
this.end = offset + count - 1;
this.maxRetryRequests =
options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;
this.onProgress = options.onProgress;
this.options = options;
this.aborter.addEventListener("abort", this.abortHandler);
this.setSourceDataHandler();
this.setSourceEndHandler();
this.setSourceErrorHandler();
}