From ebf23ca905d45235692f3c87c9085f193f435d4b Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Fri, 12 Feb 2021 15:49:05 -0800 Subject: [PATCH] [Service Bus] Fix remaining TSDoc errors (#13763) This PR fixes the remaining errors around TSDoc Resolves #12955 Related to #10781 --- .../service-bus/src/core/linkEntity.ts | 2 +- .../service-bus/src/core/messageReceiver.ts | 2 - sdk/servicebus/service-bus/src/log.ts | 2 +- .../src/modelsToBeSharedWithEventHubs.ts | 2 +- .../src/receivers/sessionReceiver.ts | 8 ++-- .../service-bus/src/serviceBusMessage.ts | 40 +++++++++---------- .../service-bus/src/serviceBusMessageBatch.ts | 2 +- .../service-bus/src/session/messageSession.ts | 6 +-- .../src/util/connectionStringUtils.ts | 2 +- 9 files changed, 32 insertions(+), 34 deletions(-) diff --git a/sdk/servicebus/service-bus/src/core/linkEntity.ts b/sdk/servicebus/service-bus/src/core/linkEntity.ts index 239be1f5007..e41b7d1baa3 100644 --- a/sdk/servicebus/service-bus/src/core/linkEntity.ts +++ b/sdk/servicebus/service-bus/src/core/linkEntity.ts @@ -198,7 +198,7 @@ export abstract class LinkEntity, abortSignal?: AbortSignalLike): Promise { // we'll check that the connection isn't in the process of recycling (and if so, wait for it to complete) diff --git a/sdk/servicebus/service-bus/src/core/messageReceiver.ts b/sdk/servicebus/service-bus/src/core/messageReceiver.ts index 710f40fb34b..db508ae9ca4 100644 --- a/sdk/servicebus/service-bus/src/core/messageReceiver.ts +++ b/sdk/servicebus/service-bus/src/core/messageReceiver.ts @@ -182,8 +182,6 @@ export abstract class MessageReceiver extends LinkEntity { /** * Creates a new AMQP receiver under a new AMQP session. - * - * @returns {Promise} Promise. */ protected async _init(options: ReceiverOptions, abortSignal?: AbortSignalLike): Promise { try { diff --git a/sdk/servicebus/service-bus/src/log.ts b/sdk/servicebus/service-bus/src/log.ts index 966e4b59643..a99bc6399db 100644 --- a/sdk/servicebus/service-bus/src/log.ts +++ b/sdk/servicebus/service-bus/src/log.ts @@ -5,7 +5,7 @@ import { AzureLogger, createClientLogger } from "@azure/logger"; import { AmqpError } from "rhea-promise"; /** - * The @azure/logger configuration for this package. + * The `@azure/logger` configuration for this package. * This will output logs using the `azure:service-bus` namespace prefix. * @internal */ diff --git a/sdk/servicebus/service-bus/src/modelsToBeSharedWithEventHubs.ts b/sdk/servicebus/service-bus/src/modelsToBeSharedWithEventHubs.ts index 8358b0db0b2..a9a00ac6f76 100644 --- a/sdk/servicebus/service-bus/src/modelsToBeSharedWithEventHubs.ts +++ b/sdk/servicebus/service-bus/src/modelsToBeSharedWithEventHubs.ts @@ -8,7 +8,7 @@ import { OperationOptions } from "@azure/core-http"; import { getTracer, OperationTracingOptions } from "@azure/core-tracing"; /** - * NOTE: This type is intended to mirror the relevant fields and structure from @azure/core-http OperationOptions + * NOTE: This type is intended to mirror the relevant fields and structure from `@azure/core-http` OperationOptions * * Options for configuring tracing and the abortSignal. */ diff --git a/sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts b/sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts index 6a588fb9605..4d06026ab10 100644 --- a/sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts +++ b/sdk/servicebus/service-bus/src/receivers/sessionReceiver.ts @@ -87,7 +87,7 @@ export interface ServiceBusSessionReceiver extends ServiceBusReceiver { /** * Gets the state of the Session. For more on session states, see - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state Session State} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State} * @param options - Options bag to pass an abort signal or tracing options. * @returns The state of that session * @throws Error if the underlying connection or receiver is closed. @@ -97,7 +97,7 @@ export interface ServiceBusSessionReceiver extends ServiceBusReceiver { /** * Sets the state on the Session. For more on session states, see - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state Session State} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State} * @param state - The state that needs to be set. * @param options - Options bag to pass an abort signal or tracing options. * @throws Error if the underlying connection or receiver is closed. @@ -232,7 +232,7 @@ export class ServiceBusSessionReceiverImpl implements ServiceBusSessionReceiver /** * Sets the state on the Session. For more on session states, see - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state Session State} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State} * @param state - The state that needs to be set. * @param options - Options bag to pass an abort signal or tracing options. * @throws Error if the underlying connection or receiver is closed. @@ -264,7 +264,7 @@ export class ServiceBusSessionReceiverImpl implements ServiceBusSessionReceiver /** * Gets the state of the Session. For more on session states, see - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state Session State} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State} * @param options - Options bag to pass an abort signal or tracing options. * @returns The state of that session * @throws Error if the underlying connection or receiver is closed. diff --git a/sdk/servicebus/service-bus/src/serviceBusMessage.ts b/sdk/servicebus/service-bus/src/serviceBusMessage.ts index a12fd950362..4478b2abda9 100644 --- a/sdk/servicebus/service-bus/src/serviceBusMessage.ts +++ b/sdk/servicebus/service-bus/src/serviceBusMessage.ts @@ -123,12 +123,12 @@ export interface ServiceBusMessage { * The correlation identifier that allows an * application to specify a context for the message for the purposes of correlation, for example * reflecting the MessageId of a message that is being replied to. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ correlationId?: string | number | Buffer; /** * The partition key for sending a message to a partitioned entity. - * Maximum length is 128 characters. For {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning partitioned entities}, + * Maximum length is 128 characters. For {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning | partitioned entities}, * setting this value enables assigning related messages to the same internal partition, * so that submission sequence order is correctly recorded. The partition is chosen by a hash * function over this value and cannot be chosen directly. @@ -143,7 +143,7 @@ export interface ServiceBusMessage { * transfer queue in the scope of a transaction, this value selects the transfer queue partition: * This is functionally equivalent to `partitionKey` property and ensures that messages are kept * together and in order as they are transferred. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-transactions#transfers-and-send-via Transfers and Send Via}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-transactions#transfers-and-send-via | Transfers and Send Via}. */ // Will be required later for implementing Transactions @@ -155,14 +155,14 @@ export interface ServiceBusMessage { * the session affiliation of the message. Messages with the same session identifier are subject * to summary locking and enable exact in-order processing and demultiplexing. For * session-unaware entities, this value is ignored. - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions Message Sessions}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions | Message Sessions}. */ sessionId?: string; /** * The session identifier augmenting the `replyTo` address. * Maximum length is 128 characters. This value augments the ReplyTo information and specifies * which SessionId should be set for the reply when sent to the reply entity. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ replyToSessionId?: string; /** @@ -172,7 +172,7 @@ export interface ServiceBusMessage { * the assumed value is the DefaultTimeToLive for the respective queue or topic. A message-level * `timeToLive` value cannot be longer than the entity's DefaultTimeToLive setting and it is * silently adjusted if it does. See - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-expiration Expiration}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-expiration | Expiration}. */ timeToLive?: number; /** @@ -184,7 +184,7 @@ export interface ServiceBusMessage { /** * The "to" address. This property is reserved for future use in routing * scenarios and presently ignored by the broker itself. Applications can use this value in - * rule-driven {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding auto-forward chaining} + * rule-driven {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding | auto-forward chaining} * scenarios to indicate the intended logical destination of the message. */ to?: string; @@ -193,7 +193,7 @@ export interface ServiceBusMessage { * application-defined value is a standard way to express a reply path to the receiver of the * message. When a sender expects a reply, it sets the value to the absolute or relative path of * the queue or topic it expects the reply to be sent to. See - * {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ replyTo?: string; /** @@ -368,7 +368,7 @@ export interface ServiceBusReceivedMessage extends ServiceBusMessage { /** * The lock token is a reference to the lock that is being held by the broker in * `peekLock` receive mode. Locks are used internally settle messages as explained in the - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement product documentation in more detail} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement | product documentation in more detail} * - Not applicable when the message is received in `receiveAndDelete` receive mode. * mode. * @readonly @@ -416,7 +416,7 @@ export interface ServiceBusReceivedMessage extends ServiceBusMessage { * * **Max safe integer** that Javascript currently supports is `2^53 - 1`. The sequence number * is an AMQP `Long` type which can be upto 64 bits long. To represent that we are using a - * library named {@link https://github.com/dcodeIO/long.js long.js}. We expect customers + * library named {@link https://github.com/dcodeIO/long.js | long.js}. We expect customers * to use the **`Long`** type exported by this library. * @readonly */ @@ -580,7 +580,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * application-defined value that uniquely identifies the message and its payload. The identifier * is a free-form string and can reflect a GUID or an identifier derived from the application * context. If enabled, the - * {@link https://docs.microsoft.com/azure/service-bus-messaging/duplicate-detection duplicate detection} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/duplicate-detection | duplicate detection} * identifies and removes second and further submissions of messages with the same MessageId. */ messageId?: string | number | Buffer; @@ -594,12 +594,12 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * The correlation identifier that allows an * application to specify a context for the message for the purposes of correlation, for example * reflecting the MessageId of a message that is being replied to. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ correlationId?: string | number | Buffer; /** * The partition key for sending a message to a - * partitioned entity. Maximum length is 128 characters. For {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning partitioned entities}, + * partitioned entity. Maximum length is 128 characters. For {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning | partitioned entities}, * setting this value enables assigning related messages to the same internal partition, * so that submission sequence order is correctly recorded. The partition is chosen by a hash * function over this value and cannot be chosen directly. For session-aware entities, @@ -612,7 +612,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * transfer queue in the scope of a transaction, this value selects the transfer queue partition: * This is functionally equivalent to `partitionKey` property and ensures that messages are kept * together and in order as they are transferred. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-transactions#transfers-and-send-via Transfers and Send Via}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-transactions#transfers-and-send-via | Transfers and Send Via}. */ // Will be required later for implementing Transactions // viaPartitionKey?: string; @@ -622,14 +622,14 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * the session affiliation of the message. Messages with the same session identifier are subject * to summary locking and enable exact in-order processing and demultiplexing. For * session-unaware entities, this value is ignored. - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions Message Sessions}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions | Message Sessions}. */ sessionId?: string; /** * The session identifier augmenting the `replyTo` address. * Maximum length is 128 characters. This value augments the ReplyTo information and specifies * which SessionId should be set for the reply when sent to the reply entity. - * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ replyToSessionId?: string; /** @@ -639,7 +639,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * the assumed value is the DefaultTimeToLive for the respective queue or topic. A message-level * `timeToLive` value cannot be longer than the entity's DefaultTimeToLive setting and it is * silently adjusted if it does. See - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-expiration Expiration}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-expiration | Expiration}. */ timeToLive?: number; /** @@ -651,7 +651,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { /** * The "to" address. This property is reserved for future use in routing * scenarios and presently ignored by the broker itself. Applications can use this value in - * rule-driven {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding auto-forward chaining} + * rule-driven {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding | auto-forward chaining} * scenarios to indicate the intended logical destination of the message. */ to?: string; @@ -660,7 +660,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { * application-defined value is a standard way to express a reply path to the receiver of the * message. When a sender expects a reply, it sets the value to the absolute or relative path of * the queue or topic it expects the reply to be sent to. See - * {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation Message Routing and Correlation}. + * {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}. */ replyTo?: string; /** @@ -675,7 +675,7 @@ export class ServiceBusMessageImpl implements ServiceBusReceivedMessage { /** * The lock token is a reference to the lock that is being held by the broker in * `peekLock` receive mode. Locks are used internally settle messages as explained in the - * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement product documentation in more detail} + * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement | product documentation in more detail} * - Not applicable when the message is received in `receiveAndDelete` receive mode. * mode. * @readonly diff --git a/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts b/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts index f3a5e2ac4be..e6468f28e7a 100644 --- a/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts +++ b/sdk/servicebus/service-bus/src/serviceBusMessageBatch.ts @@ -61,7 +61,7 @@ export interface ServiceBusMessageBatch { * The maximum size of the batch, in bytes. The `tryAddMessage` function on the batch will return `false` * if the message being added causes the size of the batch to exceed this limit. Use the `createMessageBatch()` method on * the `Sender` to set the maxSizeInBytes. - * @readonly. + * @readonly */ readonly maxSizeInBytes: number; diff --git a/sdk/servicebus/service-bus/src/session/messageSession.ts b/sdk/servicebus/service-bus/src/session/messageSession.ts index 78ab77aa856..fc1f61980fb 100644 --- a/sdk/servicebus/service-bus/src/session/messageSession.ts +++ b/sdk/servicebus/service-bus/src/session/messageSession.ts @@ -92,13 +92,13 @@ export class MessageSession extends LinkEntity { */ receiveMode: ReceiveMode; /** - * {boolean} autoComplete Indicates whether `Message.complete()` should be called + * Indicates whether `Message.complete()` should be called * automatically after the message processing is complete while receiving messages with handlers. * Default: false. */ autoComplete: boolean; /** - * {number} maxAutoRenewDurationInMs The maximum duration within which the + * The maximum duration within which the * lock will be renewed automatically. This value should be greater than the longest message * lock duration; for example, the `lockDuration` property on the received message. * @@ -106,7 +106,7 @@ export class MessageSession extends LinkEntity { */ maxAutoRenewDurationInMs: number; /** - * {boolean} autoRenewLock Should lock renewal happen automatically. + * Should lock renewal happen automatically. */ autoRenewLock: boolean; /** diff --git a/sdk/servicebus/service-bus/src/util/connectionStringUtils.ts b/sdk/servicebus/service-bus/src/util/connectionStringUtils.ts index a18f68ca8fa..e5f993119c1 100644 --- a/sdk/servicebus/service-bus/src/util/connectionStringUtils.ts +++ b/sdk/servicebus/service-bus/src/util/connectionStringUtils.ts @@ -9,7 +9,7 @@ import { parseConnectionString } from "@azure/core-amqp"; export interface ServiceBusConnectionStringProperties { /** * The fully qualified Service Bus namespace extracted from the "Endpoint" in the - * connection string. This is likely to be similar to "{yournamespace}.servicebus.windows.net". + * connection string. This is likely to be similar to `{yournamespace}.servicebus.windows.net`. * This is typically used to construct the ServiceBusClient. */ fullyQualifiedNamespace: string;