Retrieves a PathObject for the object on a channel. Implicitly attaches to the channel if not already attached.
A type parameter can be provided to describe the structure of the Objects on the channel.
Example:
import { LiveCounter } from 'ably/liveobjects';
type MyObject = {
myTypedCounter: LiveCounter;
};
const myTypedObject = await channel.object.get<MyObject>();
A promise which, upon success, will be fulfilled with a PathObject. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.
Removes all registrations that match both the specified listener and the specified event.
The named event.
The event listener.
Registers the provided listener for the specified event. If on() is called more than once with the same listener and event, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(), and an event is emitted once, the listener would be invoked twice.
The named event to listen for.
The event listener.
A StatusSubscription object that allows the provided listener to be deregistered from future updates.
Generated using TypeDoc
Enables the Objects to be read, modified and subscribed to for a channel.