Skip to content

AIDK API Reference / aidk-client / ChannelDefinition

Interface: ChannelDefinition<TIncoming, TOutgoing> ​

Defined in: packages/client/src/channel.ts:36

Channel definition - the contract for a channel

Type Parameters ​

Type ParameterDefault type
TIncoming extends Record<string, unknown>Record<string, unknown>
TOutgoing extends Record<string, unknown>Record<string, unknown>

Properties ​

PropertyTypeDescriptionDefined in
_incoming?TIncomingIncoming event types (for type inference)packages/client/src/channel.ts:45
_outgoing?TOutgoingOutgoing event types (for type inference)packages/client/src/channel.ts:47
namestringChannel namepackages/client/src/channel.ts:41

Methods ​

connect() ​

ts
connect(client: EngineClient): Channel<TIncoming, TOutgoing>;

Defined in: packages/client/src/channel.ts:43

Create a connected channel instance

Parameters ​

ParameterType
clientEngineClient

Returns ​

Channel<TIncoming, TOutgoing>

Released under the MIT License.