A type-hinted Storage interface.

Type Parameters

  • T

Hierarchy

Implemented by

Properties

length: number

The number of items in storage.

totalSize: number

The total possible size of storage in bytes.

Methods

  • Calculate how much space an item would take up in storage.

    Parameters

    • key: string
    • value: T

    Returns number

  • Calculate how many bytes of storage are in use. If no key is given, calculate for all keys.

    Parameters

    • Optional key: string

    Returns number

Generated using TypeDoc