Class StoreCollection<T, V>Abstract

Collection backed by a Solid.js Store

Type Parameters

  • T
  • V

Hierarchy (View Summary)

Constructors

Properties

getUnderlyingObject: (id: string) => V
updateUnderlyingObject: SetStoreFunction<Record<string, V>>

Methods

  • Create a new instance of an object

    Parameters

    • id: string

      Id

    • type:
          | "user"
          | "server"
          | "channel"
          | "bot"
          | "channelUnread"
          | "channelWebhook"
          | "emoji"
          | "message"
          | "serverMember"
          | "session"

      Type

    • instance: T

      Instance

    • context: unknown

      Context

    • Optionaldata: unknown

      Data

    Returns void

  • Filter the collection by a given predicate

    Parameters

    • predicate: (value: T, key: string) => boolean

      Predicate to satisfy

    Returns T[]

  • Find some value based on a predicate

    Parameters

    • predicate: (value: T, key: string) => boolean

      Predicate to satisfy

    Returns undefined | T

  • Execute a provided function over each key, value pair in the map

    Parameters

    • cb: (value: T, key: string, map: Map<string, T>) => void

      Callback for each pair

    Returns void

    Iterable

  • Check whether an object is partially defined

    Parameters

    • id: string

      Id

    Returns boolean

    Whether it is a partial