@japofc/baileys - v2.4.7
    Preparing search index...

    Interface OrderedDictionary<T, ID>

    An insertion-ordered array that also keeps an id -> item index.

    interface OrderedDictionary<T = any, ID = any> {
        array: T[];
        clear: () => void;
        filter: (contain: (item: T) => boolean) => void;
        fromJSON: (newItems: T[] | null | undefined) => void;
        get: (id: ID) => T | undefined;
        has: (id: ID) => boolean;
        remove: (item: T) => boolean;
        size: () => number;
        toJSON: () => T[];
        update: (item: T) => boolean;
        updateAssign: (id: ID, update: Partial<T>) => boolean;
        upsert: (item: T, mode?: "append" | "prepend") => void;
    }

    Type Parameters

    • T = any
    • ID = any
    Index
    array: T[]

    The items, in order. Treat as read-only; mutate through the methods.

    clear: () => void
    filter: (contain: (item: T) => boolean) => void
    fromJSON: (newItems: T[] | null | undefined) => void

    Replaces the contents and rebuilds the id index (fixed in v2.4.7, BUGREPORT §2.50).

    get: (id: ID) => T | undefined
    has: (id: ID) => boolean

    Whether an item with this id is stored (v2.4.7).

    remove: (item: T) => boolean
    size: () => number

    How many items are stored (v2.4.7).

    toJSON: () => T[]
    update: (item: T) => boolean

    true when an existing item was replaced, false when the id is unknown.

    updateAssign: (id: ID, update: Partial<T>) => boolean
    upsert: (item: T, mode?: "append" | "prepend") => void