Class CacheEntry

Hierarchy

  • EventEmitter<"update">
    • CacheEntry

Constructors

Properties

_entryExpiresIn: number
_error?: any
_expiresIn: undefined | Date
_path: string
_progress: number
_task?: DownloadResumable
_tmpPath: string
uri: string
prefixed: string | boolean

Accessors

Methods

  • Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • fn: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns CacheEntry

  • Calls each of the listeners registered for a given event.

    Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • Rest ...args: any[]

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns "update"[]

  • Return the number of listeners listening to a given event.

    Parameters

    • event: "update"

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    • T extends "update"

    Parameters

    • event: T

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

  • Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • Optional fn: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns CacheEntry

  • Add a listener for a given event.

    Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • fn: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns CacheEntry

  • Parameters

    • data: DownloadProgressData

    Returns void

  • Add a one-time listener for a given event.

    Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • fn: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns CacheEntry

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: "update"

    Returns CacheEntry

  • Remove the listeners of a given event.

    Type Parameters

    • T extends "update"

    Parameters

    • event: T
    • Optional fn: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns CacheEntry

  • Parameters

    • withTmpFile: boolean = false

    Returns Promise<void>

Generated using TypeDoc