Skip to content

Commit

Permalink
Fix optionality of Message properties
Browse files Browse the repository at this point in the history
This makes us consistent with the IDL in the feature spec.

(The only properties that are guaranteed to be populated on a message
received from Ably are `id` and `timestamp`.)
  • Loading branch information
lawrence-forooghian committed Nov 29, 2023
1 parent 0d1f6cb commit 4e3733f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ably.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2333,31 +2333,31 @@ declare namespace Types {
/**
* The client ID of the publisher of this message.
*/
clientId: string;
clientId?: string;
/**
* The connection ID of the publisher of this message.
*/
connectionId?: string;
/**
* The message payload, if provided.
*/
data: any;
data?: any;
/**
* This is typically empty, as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute contains the remaining transformations not applied to the `data` payload.
*/
encoding: string;
encoding?: string;
/**
* A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads. Valid payloads include `push`, `delta`, `ref` and `headers`.
*/
extras: any;
extras?: any;
/**
* Unique ID assigned by Ably to this message.
*/
id: string;
/**
* The event name.
*/
name: string;
name?: string;
/**
* Timestamp of when the message was received by Ably, as milliseconds since the Unix epoch.
*/
Expand Down

0 comments on commit 4e3733f

Please sign in to comment.