getChannel
getChannel<
TName>(name?):Channel<ResolveChannelMap<TName>>
Defined in: packages/postal/src/channel.ts:723
Gets or creates a singleton channel by name.
The first call with a given name creates the channel. Subsequent calls
return the same instance. The TMap generic is compile-time only —
all call sites referencing the same channel name should use the same TMap.
Type Parameters
Section titled “Type Parameters”TName extends string = "__default__"
Parameters
Section titled “Parameters”TName = ...
The channel name (defaults to "__default__")
Returns
Section titled “Returns”Channel<ResolveChannelMap<TName>>
The singleton channel instance