Interface DictStore

Inner backing data store for a dict.

interface DictStore {
    "[DICT_STORE_SYMBOL]": symbol;
    clear(): void;
    get(name: string): undefined | OptionalHVal;
    getKeys(): string[];
    has(name: string): boolean;
    remove(name: string): void;
    set(name: string, value: OptionalHVal): void;
    toJSON(): HaysonDict;
    toJSONString(): string;
    toJSONUint8Array(): Uint8Array;
    toObj(): HValObj;
}

Implemented by

Properties

"[DICT_STORE_SYMBOL]": symbol

Indicates this is a dict store.

Methods

  • Returns a haystack value from the dict or undefined if it can't be found.

    Parameters

    • name: string

      The name of the value to find.

    Returns undefined | OptionalHVal

    The value, null or undefined if it can't be found.

  • Returns true if the dict has the specified name.

    Parameters

    • name: string

      The name of the value to find.

    Returns boolean

    True if the value exists.

  • Removes a property from the dict.

    Parameters

    • name: string

      The property name.

    Returns void

  • Returns Uint8Array

    A byte buffer that has an encoded JSON string representation of the object.