@gnaudio/jabra-js
    Preparing search index...

    Interface IChannelCollection

    A collection of communication channels.

    interface IChannelCollection {
        getChannel<T extends ChannelType>(type: T): ChannelLookup<T>;
        hasChannel(type: ChannelType): boolean;
        tryGetChannel<T extends ChannelType>(type: T): ChannelLookup<T> | undefined;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Retrieve a channel of a specified type from the collection.

      Type Parameters

      Parameters

      • type: T

        The type of the desired channel

      Returns ChannelLookup<T>

      The channel of the the specified type, if it exists. If it does not exist, an error is thrown.

    • Determine whether the collection contains a channel of the requested type.

      Parameters

      Returns boolean

      true, if the collection contains a channel of the specified type. Otherwise false.

    • Try to retrieve a channel of a specified type from the collection.

      Type Parameters

      Parameters

      • type: T

        The type of the desired channel

      Returns ChannelLookup<T> | undefined

      The channel of the the specified type, if it exists. If it does not exist, undefined is returned.