Skip to content

Commit

Permalink
[Event Hubs] Remove invalid tsdoc tags (#13638)
Browse files Browse the repository at this point in the history
This PR removes the below invalid TSDoc tags fixing about 20 linting errors
- `@class`
- `@ignore`
- `@constructor`

Additionally, 
- it removes the `@hidden` tag if  `@internal` is already applied
- it removes the `@hidden` or `internal` tag on a interface/class member if the interface/class itself already has one of the two tags

Related to #12953
  • Loading branch information
ramya-rao-a authored Feb 6, 2021
1 parent 7b34c24 commit 39041ef
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 52 deletions.
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/connectionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export interface ConnectionContext extends ConnectionContextBase {
/**
* Describes the members on the ConnectionContext that are only
* used by it internally.
* @hidden
* @internal
*/
export interface ConnectionContextInternalMembers extends ConnectionContext {
Expand Down Expand Up @@ -432,7 +431,6 @@ export namespace ConnectionContext {
* Helper method to create a ConnectionContext from the input passed to either
* EventHubProducerClient or EventHubConsumerClient constructors
*
* @hidden
* @internal
*/
export function createConnectionContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const TRACEPARENT_PROPERTY = "Diagnostic-Id";
* has already been instrumented.
* @param eventData The `EventData` to instrument.
* @param span The `Span` containing the context to propagate tracing information.
* @hidden
* @internal
*/
export function instrumentEventData(eventData: EventData, span: Span): EventData {
if (eventData.properties && eventData.properties[TRACEPARENT_PROPERTY]) {
Expand Down
8 changes: 0 additions & 8 deletions sdk/eventhub/event-hubs/src/eventDataBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export interface EventDataBatch {
* set the partitionKey.
* @readonly
* @internal
* @hidden
*/
readonly partitionKey?: string;

Expand All @@ -72,7 +71,6 @@ export interface EventDataBatch {
* the `EventHubProducerClient` to set the partitionId.
* @readonly
* @internal
* @hidden
*/
readonly partitionId?: string;

Expand Down Expand Up @@ -113,23 +111,20 @@ export interface EventDataBatch {
* This is not meant for the user to use directly.
*
* @internal
* @hidden
*/
_generateMessage(): Buffer;

/**
* Gets the "message" span contexts that were created when adding events to the batch.
* Used internally by the `sendBatch()` method to set up the right spans in traces if tracing is enabled.
* @internal
* @hidden
*/
readonly _messageSpanContexts: SpanContext[];
}

/**
* An internal class representing a batch of events which can be used to send events to Event Hub.
*
* @class
* @internal
*/
export class EventDataBatchImpl implements EventDataBatch {
Expand Down Expand Up @@ -179,9 +174,7 @@ export class EventDataBatchImpl implements EventDataBatch {
/**
* EventDataBatch should not be constructed using `new EventDataBatch()`
* Use the `createBatch()` method on your `EventHubProducer` instead.
* @constructor
* @internal
* @hidden
*/
constructor(
context: ConnectionContext,
Expand Down Expand Up @@ -243,7 +236,6 @@ export class EventDataBatchImpl implements EventDataBatch {
/**
* Gets the "message" span contexts that were created when adding events to the batch.
* @internal
* @hidden
*/
get _messageSpanContexts(): SpanContext[] {
return this._spanContexts;
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventHubReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export type OnAbort = () => void;

/**
* Describes the EventHubReceiver that will receive event data from EventHub.
* @class EventHubReceiver
* @internal
*/
export class EventHubReceiver extends LinkEntity {
Expand Down Expand Up @@ -193,7 +192,6 @@ export class EventHubReceiver extends LinkEntity {
* Instantiates a receiver that can be used to receive events over an AMQP receiver link in
* either batching or streaming mode.
* @hidden
* @constructor
* @param context The connection context corresponding to the EventHubClient instance
* @param consumerGroup The consumer group from which the receiver should receive events from.
* @param partitionId The Partition ID from which to receive.
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventHubSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { defaultDataTransformer } from "./dataTransformer";

/**
* Describes the EventHubSender that will send event data to EventHub.
* @class EventHubSender
* @internal
*/
export class EventHubSender extends LinkEntity {
Expand Down Expand Up @@ -75,7 +74,6 @@ export class EventHubSender extends LinkEntity {
/**
* Creates a new EventHubSender instance.
* @hidden
* @constructor
* @param context The connection context.
* @param [partitionId] The EventHub partition id to which the sender
* wants to send the event data.
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export const latestEventPosition: EventPosition = {
};

/**
* @hidden
* @internal
*/
export function validateEventPositions(
Expand Down Expand Up @@ -142,7 +141,6 @@ export function validateEventPositions(
* Determines whether a position is an EventPosition.
* Does not validate that the position is allowed.
* @param position
* @hidden
* @internal
*/
export function isEventPosition(position: unknown): position is EventPosition {
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ export interface FullEventProcessorOptions extends CommonEventProcessorOptions {
/**
* An optional pump manager to use, rather than instantiating one internally
* @internal
* @hidden
*/
pumpManager?: PumpManager;
/**
Expand Down Expand Up @@ -172,7 +171,6 @@ export interface FullEventProcessorOptions extends CommonEventProcessorOptions {
* For production, choose an implementation that will store checkpoints and partition ownership details to a durable store.
* Implementations of `CheckpointStore` can be found on npm by searching for packages with the prefix @azure/eventhub-checkpointstore-.
*
* @class EventProcessor
* @internal
*/
export class EventProcessor {
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventhubConnectionConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { parseEndpoint } from "./util/parseEndpoint";
* string. It also provides some convenience methods for getting the address and audience for
* different entities.
* @internal
* @ignore
*/
export interface EventHubConnectionConfig extends ConnectionConfig {
/**
Expand Down Expand Up @@ -69,7 +68,6 @@ export interface EventHubConnectionConfig extends ConnectionConfig {
* string. It also provides some convenience methods for getting the address and audience for
* different entities.
* @internal
* @ignore
*/
export const EventHubConnectionConfig = {
/**
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/eventhubSharedKeyCredential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import isBuffer from "is-buffer";
import jssha from "jssha";

/**
* @class SharedKeyCredential
* Defines the SharedKeyCredential .
*/
export class SharedKeyCredential {
Expand All @@ -24,7 +23,6 @@ export class SharedKeyCredential {

/**
* Initializes a new instance of SharedKeyCredential
* @constructor
* @param {string} keyName - The name of the EventHub/ServiceBus key.
* @param {string} key - The secret value associated with the above EventHub/ServiceBus key
*/
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/inMemoryCheckpointStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { throwTypeErrorIfParameterMissing } from "./util/error";
* But in production, you should choose an implementation of the `CheckpointStore` interface that will
* store the checkpoints and partition ownerships to a durable store instead.
*
* @class
* @internal
*/
export class InMemoryCheckpointStore implements CheckpointStore {
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/linkEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export interface LinkEntityOptions {
/**
* Describes the base class for entities like EventHub Sender, Receiver and Management link.
* @internal
* @class LinkEntity
*/
export class LinkEntity {
/**
Expand Down Expand Up @@ -96,7 +95,6 @@ export class LinkEntity {
/**
* Creates a new LinkEntity instance.
* @hidden
* @constructor
* @param context The connection context.
* @param [options] Options that can be provided while creating the LinkEntity.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ interface EventProcessorCounts {
* @param partitionOwnershipMap The existing PartitionOwnerships mapped by partition.
* @param expirationIntervalInMs The length of time a PartitionOwnership claim is valid.
* @hidden
* @internal
*/
function getActivePartitionOwnerships(
partitionOwnershipMap: Map<string, PartitionOwnership>,
Expand Down Expand Up @@ -89,7 +88,6 @@ function getActivePartitionOwnerships(
* and the number of EventProcessors that should have an extra partition assigned.
* @param ownerToOwnershipMap The current ownerships for partitions.
* @param partitionIds The full list of the Event Hub's partition ids.
* @hidden
* @internal
*/
function calculateBalancedLoadCounts(
Expand Down Expand Up @@ -171,7 +169,6 @@ function getEventProcessorCounts(
* @param requiredNumberOfOwnersWithExtraPartition The # of EventProcessors that process an additional partition, in addition to the required minimum.
* @param totalExpectedProcessors The total # of EventProcessors we expect.
* @param eventProcessorCounts EventProcessor counts, grouped by criteria.
* @hidden
* @internal
*/
function isLoadBalanced(
Expand All @@ -192,7 +189,6 @@ function isLoadBalanced(
* @param requiredNumberOfOwnersWithExtraPartition The current number of processors that should have an additional partition.
* @param numPartitionsOwnedByUs The number of partitions we currently own.
* @param eventProcessorCounts Processors, grouped by criteria.
* @hidden
* @internal
*/
function getNumberOfPartitionsToClaim(
Expand Down
3 changes: 0 additions & 3 deletions sdk/eventhub/event-hubs/src/managementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export interface ManagementClientOptions {
}

/**
* @class ManagementClient
* @internal
* Descibes the EventHubs Management Client that talks
* to the $management endpoint over AMQP connection.
Expand All @@ -119,7 +118,6 @@ export class ManagementClient extends LinkEntity {

/**
* Instantiates the management client.
* @constructor
* @hidden
* @param context The connection context.
* @param [address] The address for the management endpoint. For IotHub it will be
Expand All @@ -137,7 +135,6 @@ export class ManagementClient extends LinkEntity {

/**
* Gets the security token for the management application properties.
* @hidden
* @internal
*/
async getSecurityToken(): Promise<AccessToken | null> {
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/models/private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { LoadBalancingStrategy } from "../loadBalancerStrategies/loadBalancingSt
* - `partitionId` : The string identifier of the partition that the producer can be bound to.
* - `retryOptions` : The retry options used to govern retry attempts when an issue is encountered while sending events.
* A simple usage can be `{ "maxRetries": 4 }`.
* @hidden
* @internal
*/
export interface EventHubProducerOptions {
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/src/partitionPump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { ReceivedEventData } from "./eventData";
import { ConnectionContext } from "./connectionContext";

/**
* @hidden
* @internal
*/
export class PartitionPump {
Expand Down Expand Up @@ -248,7 +247,6 @@ export function createProcessingSpan(
}

/**
* @hidden
* @internal
*/
export async function trace(fn: () => Promise<void>, span: Span): Promise<void> {
Expand Down
6 changes: 0 additions & 6 deletions sdk/eventhub/event-hubs/src/pumpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { ConnectionContext } from "./connectionContext";
* The PumpManager handles the creation and removal of PartitionPumps.
* It also starts a PartitionPump when it is created, and stops a
* PartitionPump when it is removed.
* @hidden
* @internal
*/
export interface PumpManager {
Expand All @@ -24,7 +23,6 @@ export interface PumpManager {
* @param eventHubClient The EventHubClient to forward to the PartitionPump.
* @param partitionProcessor The PartitionProcessor to forward to the PartitionPump.
* @param abortSignal Used to cancel pump creation.
* @hidden
*/
createPump(
startPosition: EventPosition,
Expand All @@ -36,15 +34,12 @@ export interface PumpManager {
/**
* Indicates whether the pump manager is actively receiving events from a given partition.
* @param partitionId The partition to check.
* @hidden
* @internal
*/
isReceivingFromPartition(partitionId: string): boolean;

/**
* Stops all PartitionPumps and removes them from the internal map.
* @param reason The reason for removing the pump.
* @hidden
*/
removeAllPumps(reason: CloseReason): Promise<void>;
}
Expand Down Expand Up @@ -85,7 +80,6 @@ export class PumpManagerImpl implements PumpManager {
/**
* Indicates whether the pump manager is actively receiving events from a given partition.
* @param partitionId
* @hidden
* @internal
*/
public isReceivingFromPartition(partitionId: string): boolean {
Expand Down
3 changes: 0 additions & 3 deletions sdk/eventhub/event-hubs/src/receiveHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { logErrorStackTrace, logger } from "./log";
/**
* Describes the receive handler object that is returned from the receive() method with handlers.
* The ReceiveHandler is used to stop receiving more messages.
* @class ReceiveHandler
* @hidden
* @internal
*/
export class ReceiveHandler {
Expand All @@ -19,7 +17,6 @@ export class ReceiveHandler {

/**
* Creates an instance of the ReceiveHandler.
* @constructor
* @internal
* @param receiver The underlying EventHubReceiver.
*/
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/util/connectionStringUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export function parseEventHubConnectionString(

/**
* @internal
* @ignore
*/
function validateProperties(
endpoint?: string,
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/util/parseEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/**
* Parses the host, hostname, and port from an endpoint.
* @param endpoint And endpoint to parse.
* @hidden
* @internal
*/
export function parseEndpoint(endpoint: string): { host: string; hostname: string; port?: string } {
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/util/runtimeInfo.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface Navigator {

/**
* Returns information about the platform this function is being run on.
* @hidden
* @internal
*/
export function getRuntimeInfo(): string {
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/src/util/runtimeInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as os from "os";

/**
* Returns information about the platform this function is being run on.
* @hidden
* @internal
*/
export function getRuntimeInfo(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import { generate_uuid } from "rhea-promise";
* But in production, you should choose an implementation of the `CheckpointStore` interface that will
* store the checkpoints and partition ownerships to a durable store instead.
* Please note - this is only meant for use within the test and not in production code
* @class
* @internal
* @ignore
*/
export class TestInMemoryCheckpointStore implements CheckpointStore {
private _partitionOwnershipMap: Map<string, PartitionOwnership> = new Map();
Expand Down

0 comments on commit 39041ef

Please sign in to comment.