How to use the @azure/abort-controller.AbortSignal.none function in @azure/abort-controller

To help you get started, we’ve selected a few @azure/abort-controller examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-js / sdk / storage / storage-file / src / utils / RetriableReadableStream.ts View on Github external
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();
github Azure / azure-sdk-for-js / sdk / storage / storage-utils / RetriableReadableStream.ts View on Github external
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();
  }

@azure/abort-controller

Microsoft Azure SDK for JavaScript - Aborter

MIT
Latest version published 9 months ago

Package Health Score

81 / 100
Full package analysis