From d20b609fc29067870781c4d9f1e03f5ee8fbbcc3 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Fri, 10 Nov 2023 12:02:30 -0300 Subject: [PATCH] Remove static methods from Message and PresenceMessage typings These declarations are unreachable via the typings. The user needs to access these methods via the MessageStatic and PresenceMessageStatic interfaces. --- ably.d.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/ably.d.ts b/ably.d.ts index c938527491..908ccd6153 100644 --- a/ably.d.ts +++ b/ably.d.ts @@ -2393,22 +2393,6 @@ declare namespace Types { * @internal */ constructor(); - /** - * A static factory method to create a `Message` object from a deserialized Message-like object encoded using Ably's wire protocol. - * - * @param JsonObject - A `Message`-like deserialized object. - * @param channelOptions - A {@link ChannelOptions} object. If you have an encrypted channel, use this to allow the library to decrypt the data. - * @returns A promise which will be fulfilled with a `Message` object. - */ - static fromEncoded: (JsonObject: any, channelOptions?: ChannelOptions) => Promise; - /** - * A static factory method to create an array of `Message` objects from an array of deserialized Message-like object encoded using Ably's wire protocol. - * - * @param JsonArray - An array of `Message`-like deserialized objects. - * @param channelOptions - A {@link ChannelOptions} object. If you have an encrypted channel, use this to allow the library to decrypt the data. - * @returns A promise which will be fulfilled with an array of {@link Message} objects. - */ - static fromEncodedArray: (JsonArray: any[], channelOptions?: ChannelOptions) => Promise; /** * The client ID of the publisher of this message. */ @@ -2475,20 +2459,6 @@ declare namespace Types { * @internal */ constructor(); - /** - * Decodes and decrypts a deserialized `PresenceMessage`-like object using the cipher in {@link ChannelOptions}. Any residual transforms that cannot be decoded or decrypted will be in the `encoding` property. Intended for users receiving messages from a source other than a REST or Realtime channel (for example a queue) to avoid having to parse the encoding string. - * - * @param JsonObject - The deserialized `PresenceMessage`-like object to decode and decrypt. - * @param channelOptions - A {@link ChannelOptions} object containing the cipher. - */ - static fromEncoded: (JsonObject: any, channelOptions?: ChannelOptions) => Promise; - /** - * Decodes and decrypts an array of deserialized `PresenceMessage`-like object using the cipher in {@link ChannelOptions}. Any residual transforms that cannot be decoded or decrypted will be in the `encoding` property. Intended for users receiving messages from a source other than a REST or Realtime channel (for example a queue) to avoid having to parse the encoding string. - * - * @param JsonArray - An array of deserialized `PresenceMessage`-like objects to decode and decrypt. - * @param channelOptions - A {@link ChannelOptions} object containing the cipher. - */ - static fromEncodedArray: (JsonArray: any[], channelOptions?: ChannelOptions) => Promise; /** * The type of {@link PresenceAction} the `PresenceMessage` is for. */