Options
All
  • Public
  • Public/Protected
  • All
Menu

resource-loader

Index

Type aliases

AbstractLoadStrategyCtor

AbstractLoadStrategyCtor<C>: {}

Type parameters

Type declaration

IItemCallback

IItemCallback: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

INext

INext: (err?: Error) => void

Type declaration

    • (err?: Error): void
    • Parameters

      • Optional err: Error

      Returns void

IWorker

IWorker<T>: (item: T, next: INext) => void

Type parameters

  • T

Type declaration

    • (item: T, next: INext): void
    • Parameters

      Returns void

OnDoneSignal

OnDoneSignal: () => void

Type declaration

    • (): void
    • Returns void

OnDrainSignal

OnDrainSignal: () => void

Type declaration

    • (): void
    • Returns void

OnEmptySignal

OnEmptySignal: () => void

Type declaration

    • (): void
    • Returns void

OnErrorSignal

OnErrorSignal<T>: (err: Error, data: T) => void

Type parameters

  • T

Type declaration

    • (err: Error, data: T): void
    • Parameters

      • err: Error
      • data: T

      Returns void

OnSaturatedSignal

OnSaturatedSignal: () => void

Type declaration

    • (): void
    • Returns void

OnUnsaturatedSignal

OnUnsaturatedSignal: () => void

Type declaration

    • (): void
    • Returns void

Overwrite

Overwrite<T1, T2>: {} & T2

Type parameters

  • T1

  • T2

Variables

Const EMPTY_GIF

EMPTY_GIF: "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="

Const MAX_PROGRESS

MAX_PROGRESS: 100 = 100

Const rgxExtractUrlHash

rgxExtractUrlHash: RegExp = /(#[\w-]+)?$/

Const useXdr

useXdr: boolean = !!((window as any).XDomainRequest && !('withCredentials' in (new XMLHttpRequest())))

Functions

assertNever

  • assertNever(x: never): never

eachSeries

  • eachSeries<T>(array: T[], iterator: (item: T, next: (err?: Error) => void) => void, callback?: undefined | ((err?: Error) => void), deferNext?: boolean): void
  • Iterates an array in series.

    Type parameters

    • T

      Element type of the array.

    Parameters

    • array: T[]

      Array to iterate.

    • iterator: (item: T, next: (err?: Error) => void) => void

      Function to call for each element.

        • (item: T, next: (err?: Error) => void): void
        • Parameters

          • item: T
          • next: (err?: Error) => void
              • (err?: Error): void
              • Parameters

                • Optional err: Error

                Returns void

          Returns void

    • Optional callback: undefined | ((err?: Error) => void)

      Function to call when done, or on error.

    • Default value deferNext: boolean = false

      Break synchronous each loop by calling next with a setTimeout of 1.

    Returns void

getExtension

  • getExtension(url: string): string
  • Extracts the extension (sans '.') of the file being loaded by the resource.

    Parameters

    • url: string

    Returns string

reqType

  • reqType(xhr: XMLHttpRequest): string

Generated using TypeDoc