Namespace
Everything a namespace makes, with the prefix already applied.
The same signatures as the bare factories, minus nothing — a namespace is a naming decision, not a reduced API.
Properties
Section titled “Properties”readonly name: string;The prefix every name from this namespace carries.
Methods
Section titled “Methods”busName()
Section titled “busName()”busName(name?): string;What a bare name becomes here. Exposed so devtools, observeBus and tests can name the same bus.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
Returns
Section titled “Returns”string
createChannel()
Section titled “createChannel()”createChannel<M>(name?, options?): Channel<M>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
M extends MessageMap |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
options? | ChannelOptions<M> |
Returns
Section titled “Returns”Channel<M>
createLeader()
Section titled “createLeader()”createLeader(name?, options?): Leader;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
options? | LeaderOptions |
Returns
Section titled “Returns”createPresence()
Section titled “createPresence()”createPresence(name?, options?): Presence;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
options? | PresenceOptions |
Returns
Section titled “Returns”createSharedStore()
Section titled “createSharedStore()”createSharedStore<S>( name, initial,options?): SharedStore<S>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
S extends Record<string, unknown> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name | string | undefined |
initial | S |
options? | SharedStoreOptions<S> |
Returns
Section titled “Returns”SharedStore<S>