From 337d70dbe0655ef4280597a0ec345ea121b25b71 Mon Sep 17 00:00:00 2001 From: Mohsin Mehmood Date: Thu, 24 Sep 2020 14:08:02 +0800 Subject: [PATCH] [Service Bus] Type docs fix - Added @internal and @ignore tags for internal methods (#11427) * logger, isError, toAmqpAnnotatedMessage changed to internal * SubQueue renamed to _SubQueue and changed to internal for jsdoc * Revert "SubQueue renamed to _SubQueue and changed to internal for jsdoc" This reverts commit b97b6826d1016d5ce9d6aa25d427098d27820c56. --- sdk/servicebus/service-bus/src/log.ts | 2 ++ sdk/servicebus/service-bus/src/serviceBusMessage.ts | 2 ++ sdk/servicebus/service-bus/src/util/errors.ts | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/servicebus/service-bus/src/log.ts b/sdk/servicebus/service-bus/src/log.ts index 84b312f9e979..5eb5c4ad6659 100644 --- a/sdk/servicebus/service-bus/src/log.ts +++ b/sdk/servicebus/service-bus/src/log.ts @@ -6,6 +6,8 @@ import { createClientLogger } from "@azure/logger"; /** * The @azure/logger configuration for this package. * This will output logs using the `azure:event-hubs` namespace prefix. + * @ignore + * @internal */ export const logger = createClientLogger("service-bus"); diff --git a/sdk/servicebus/service-bus/src/serviceBusMessage.ts b/sdk/servicebus/service-bus/src/serviceBusMessage.ts index b6e1167e9c59..153f6666ac3a 100644 --- a/sdk/servicebus/service-bus/src/serviceBusMessage.ts +++ b/sdk/servicebus/service-bus/src/serviceBusMessage.ts @@ -826,6 +826,8 @@ export function fromAmqpMessage( * @export * @param {AmqpMessage} msg * @returns {AmqpAnnotatedMessage} + * @internal + * @ignore */ export function toAmqpAnnotatedMessage(msg: AmqpMessage): AmqpAnnotatedMessage { const messageHeader = MessageHeader.fromAmqpMessageHeader(msg); diff --git a/sdk/servicebus/service-bus/src/util/errors.ts b/sdk/servicebus/service-bus/src/util/errors.ts index e9102ef933d7..108c1582da33 100644 --- a/sdk/servicebus/service-bus/src/util/errors.ts +++ b/sdk/servicebus/service-bus/src/util/errors.ts @@ -7,10 +7,10 @@ import { ConnectionContext } from "../connectionContext"; import { AmqpError } from "rhea-promise"; /** - * Error message to use when EntityPath in connection string does not match the + * Error message to use when EntityPath in connection string does not match the * queue or topic name passed to the methods in the ServiceBusClient that create * senders and receivers. - * + * * @internal * @ignore */ @@ -217,6 +217,10 @@ export function logError(err: Error | AmqpError | undefined, ...args: any[]): vo logErrorStackTrace(err); } +/** + * @internal + * @ignore + */ function isError(err: Error | AmqpError | undefined): err is Error { return err != null && (err as any).name != null; }