Skip to content

API reference / @chanx-js/server / core / AnyMessageDefinition

Interface: AnyMessageDefinition ​

Defined in: packages/server/src/messages.ts:26

Any message definition, whatever its action and payload.

Extends ​

Properties ​

action ​

ts
readonly action: string;

Defined in: packages/server/src/messages.ts:14

The action discriminant on the wire.

Inherited from ​

ts
Omit.action

description? ​

ts
readonly optional description?: string;

Defined in: packages/server/src/messages.ts:20

Documented in AsyncAPI.

Inherited from ​

ts
Omit.description

payload ​

ts
readonly payload: 
  | StandardSchemaV1<unknown, unknown>
  | null;

Defined in: packages/server/src/messages.ts:16

Validates the payload; null for a message that carries none.

Inherited from ​

ts
Omit.payload

title ​

ts
readonly title: string;

Defined in: packages/server/src/messages.ts:18

Its AsyncAPI component name.

Inherited from ​

ts
Omit.title

Methods ​

create() ​

ts
create(...args): Message;

Defined in: packages/server/src/messages.ts:27

Parameters ​

ParameterType
...argsnever

Returns ​

Message

MIT licensed