classicborne-server-protocol
    Preparing search index...

    Class ExtensionManager

    I manage the currently applied Classic Protocol Extension extensions for a Client.

    In the classicborne ecosystem, clear communication is valued. This means that some extensions have the same name as described in their Classic Protocol Extension. However, some are either unclear or misleading, so they may be referred to as differently in classicborne-server-protocol. This is of course no exception when retriving extensions from me. See the extensions namespace for what these extensions are called.

    Hierarchy

    • Map
      • ExtensionManager
    Index

    Constructors

    Properties

    "[toStringTag]": string
    client: Client
    size: number

    the number of elements in the Map.

    "[species]": MapConstructor

    Methods

    • Returns an iterable of entries in the map.

      Returns MapIterator<[keyof defaultExtensions, BaseExtension]>

    • Returns void

    • Parameters

      • key: keyof defaultExtensions

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

    • Returns an iterable of key, value pairs for every entry in the map.

      Returns MapIterator<[keyof defaultExtensions, BaseExtension]>

    • Executes a provided function once per each key/value pair in the Map, in insertion order.

      Parameters

      • callbackfn: (
            value: BaseExtension,
            key: keyof defaultExtensions,
            map: Map<keyof defaultExtensions, BaseExtension>,
        ) => void
      • OptionalthisArg: any

      Returns void

    • Type Parameters

      • K extends keyof defaultExtensions

      Parameters

      • key: K

        Name of the extension.

      Returns defaultExtensions[K]

      The extension instance.

    • Parameters

      • key: keyof defaultExtensions

      Returns boolean

      boolean indicating whether an element with the specified key exists or not.

    • Returns an iterable of keys in the map

      Returns MapIterator<keyof defaultExtensions>

    • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

      Parameters

      • key: keyof defaultExtensions
      • value: BaseExtension

      Returns this

    • Returns an iterable of values in the map

      Returns MapIterator<BaseExtension>

    • Groups members of an iterable according to the return value of the passed callback.

      Type Parameters

      • K
      • T

      Parameters

      • items: Iterable<T>

        An iterable.

      • keySelector: (item: T, index: number) => K

        A callback which will be invoked for each item in items.

      Returns Map<K, T[]>