Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LevelUp<DB, Iterator>

Type parameters

  • DB

  • Iterator

Hierarchy

  • EventEmitter
    • LevelUp

Index

Properties

del

del: InferDBDel<DB>

get

get: InferDBGet<DB>

put

put: InferDBPut<DB>

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

batch

  • Parameters

    Returns Promise<void>

  • Parameters

    • array: AbstractBatch[]
    • options: any
    • callback: function
        • (err?: any): any
        • Parameters

          • Optional err: any

          Returns any

    Returns void

  • Parameters

    • array: AbstractBatch[]
    • callback: function
        • (err?: any): any
        • Parameters

          • Optional err: any

          Returns any

    Returns void

  • Returns LevelUpChain

close

  • Returns Promise<void>

  • Parameters

    Returns void

createKeyStream

  • Parameters

    Returns ReadableStream

createReadStream

  • Parameters

    Returns ReadableStream

createValueStream

  • Parameters

    Returns ReadableStream

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

isClosed

  • isClosed(): boolean
  • Returns boolean

isOpen

  • isOpen(): boolean
  • Returns boolean

iterator

  • Parameters

    Returns Iterator

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "put", cb: function): this
  • on(event: "del", cb: function): this
  • on(event: "batch", cb: function): this
  • on(event: "open" | "ready" | "closed" | "opening" | "closing", cb: function): this
  • Parameters

    • event: "put"
    • cb: function
        • (key: any, value: any): void
        • Parameters

          • key: any
          • value: any

          Returns void

    Returns this

  • Parameters

    • event: "del"
    • cb: function
        • (key: any): void
        • Parameters

          • key: any

          Returns void

    Returns this

  • Parameters

    • event: "batch"
    • cb: function
        • (ary: any[]): void
        • Parameters

          • ary: any[]

          Returns void

    Returns this

  • Parameters

    • event: "open" | "ready" | "closed" | "opening" | "closing"
    • cb: function
        • (): void
        • Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

open

  • Returns Promise<void>

  • Parameters

    Returns void

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc