Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardization of our documentation comments #12912

Merged
24 commits merged into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7d3107c
[ESLint plugin] Use TSDoc plugin
deyaaeldeen Dec 15, 2020
65480b6
Fix tsdoc issues in abort-controller
deyaaeldeen Dec 15, 2020
e1dfdfa
Fix tsdoc issues in logger
deyaaeldeen Dec 15, 2020
76352ca
Fix tsdoc issues in core-tracing
deyaaeldeen Dec 15, 2020
7a1f774
Fix tsdoc issues in core-lro
deyaaeldeen Dec 15, 2020
bbbb801
Fix tsdoc issues in core-auth
deyaaeldeen Dec 15, 2020
e9616d3
Fix tsdoc issues in core-http
deyaaeldeen Dec 15, 2020
29ceb4a
Fix tsdoc issues in identity
deyaaeldeen Dec 15, 2020
f8cee2a
Fix tsdoc issues in keyvault-secrets
deyaaeldeen Dec 15, 2020
ffb4336
Fix tsdoc issues in keyvault-certificates
deyaaeldeen Dec 15, 2020
7fe51c4
Fix tsdoc issues in keyvault-keys
deyaaeldeen Dec 15, 2020
a6d015c
Fix tsdoc issues in keyvault-common
deyaaeldeen Dec 15, 2020
365d315
Fix tsdoc issues in keyvault-admin
deyaaeldeen Dec 15, 2020
8e21687
Fix tsdoc issues in schemaregistery
deyaaeldeen Dec 15, 2020
463b5e9
Fix tsdoc issues in textanalytics
deyaaeldeen Dec 15, 2020
0669122
Fix tsdoc issues in anomalydetector
deyaaeldeen Dec 15, 2020
a940843
Fix tsdoc issues in formrecognizer
deyaaeldeen Dec 15, 2020
bf40c44
Fix tsdoc issues in metricsadvisor
deyaaeldeen Dec 15, 2020
3197ed1
Fix tsdoc issues in tables
deyaaeldeen Dec 15, 2020
5084c10
Fix tsdoc issues in eventgrid
deyaaeldeen Dec 15, 2020
37ce528
adding hidden tag
deyaaeldeen Dec 16, 2020
ec0b33c
adding --stripInternal to ignore definitions tagged with @internal
deyaaeldeen Dec 16, 2020
f3c3c94
replace deleted @ignore with @hidden
deyaaeldeen Dec 16, 2020
8a471bb
adding tsdoc.json to packages that use @hidden
deyaaeldeen Dec 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sdk/eventgrid/eventgrid/src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class EventGridConsumer {
/**
* Deserializes events encoded in the Event Grid schema.
*
* @param encodedEvents the JSON encoded representation of either a single event or an array of
* @param encodedEvents - the JSON encoded representation of either a single event or an array of
* events, encoded in the Event Grid Schema.
*/
public async deserializeEventGridEvents(
Expand All @@ -64,7 +64,7 @@ export class EventGridConsumer {
/**
* Deserializes events encoded in the Event Grid schema.
*
* @param encodedEvents an object representing a single event, encoded in the Event Grid schema.
* @param encodedEvents - an object representing a single event, encoded in the Event Grid schema.
*/
public async deserializeEventGridEvents(
encodedEvents: object
Expand Down Expand Up @@ -98,15 +98,15 @@ export class EventGridConsumer {
/**
* Deserializes events encoded in the Cloud Events 1.0 schema.
*
* @param encodedEvents the JSON encoded representation of either a single event or an array of
* @param encodedEvents - the JSON encoded representation of either a single event or an array of
* events, encoded in the Cloud Events 1.0 Schema.
*/
public async deserializeCloudEvents(encodedEvents: string): Promise<CloudEvent<unknown>[]>;

/**
* Deserializes events encoded in the Cloud Events 1.0 schema.
*
* @param encodedEvents an object representing a single event, encoded in the Cloud Events 1.0 schema.
* @param encodedEvents - an object representing a single event, encoded in the Cloud Events 1.0 schema.
*/
public async deserializeCloudEvents(encodedEvents: object): Promise<CloudEvent<unknown>[]>;
public async deserializeCloudEvents(
Expand Down
1 change: 0 additions & 1 deletion sdk/eventgrid/eventgrid/src/cryptoHelpers.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

/**
* @internal
* @ignore
*/
export async function sha256Hmac(secret: string, stringToSign: string): Promise<string> {
const key = await self.crypto.subtle.importKey(
Expand Down
1 change: 0 additions & 1 deletion sdk/eventgrid/eventgrid/src/cryptoHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { createHmac } from "crypto";

/**
* @internal
* @ignore
*/
export async function sha256Hmac(secret: string, stringToSign: string): Promise<string> {
const decodedSecret = Buffer.from(secret, "base64");
Expand Down
14 changes: 7 additions & 7 deletions sdk/eventgrid/eventgrid/src/eventGridClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ export class EventGridPublisherClient {
* );
* ```
*
* @param endpointUrl The URL to the EventGrid endpoint, e.g. https://eg-topic.westus2-1.eventgrid.azure.net/api/events
* @param credential Used to authenticate requests to the service.
* @param options Used to configure the Event Grid Client
* @param endpointUrl - The URL to the EventGrid endpoint, e.g. https://eg-topic.westus2-1.eventgrid.azure.net/api/events
* @param credential - Used to authenticate requests to the service.
* @param options - Used to configure the Event Grid Client
*/
constructor(
endpointUrl: string,
Expand Down Expand Up @@ -124,9 +124,9 @@ export class EventGridPublisherClient {
}

/**
* Publishes events in the Event Grid scheama. The topic must be configured to expect events in the Event Grid schema.
* Publishes events in the Event Grid schema. The topic must be configured to expect events in the Event Grid schema.
deyaaeldeen marked this conversation as resolved.
Show resolved Hide resolved
*
* @param message One or more events to publish
* @param message - One or more events to publish
*/
async sendEvents(
events: SendEventGridEventInput<any>[],
Expand Down Expand Up @@ -155,7 +155,7 @@ export class EventGridPublisherClient {
/**
* Publishes events in the Cloud Events 1.0 schema. The topic must be configured to expect events in the Cloud Events 1.0 schema.
*
* @param message One or more events to publish
* @param message - One or more events to publish
*/
async sendCloudEvents(
events: SendCloudEventInput<any>[],
Expand Down Expand Up @@ -184,7 +184,7 @@ export class EventGridPublisherClient {
/**
* Publishes events written using a custom schema. The topic must be configured to expect events in a custom schema.
*
* @param message One or more events to publish
* @param message - One or more events to publish
*/
async sendCustomSchemaEvents(
events: Record<string, any>[],
Expand Down
8 changes: 4 additions & 4 deletions sdk/eventgrid/eventgrid/src/generateSharedAccessSignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export interface GenerateSharedAccessSignatureOptions {
* Generate a shared access signature, which allows a client to send events to an Event Grid Topic or Domain for a limited period of time. This
* function may only be called when the EventGridPublisherClient was constructed with a KeyCredential instance.
*
* @param endpointUrl The endpoint for the topic or domain you wish to generate a shared access signature for.
* @param credential The credential to use when generating the shared access signatrue.
* @param expiresOn The time at which the shared access signature is no longer valid.
* @param options Options to control how the signature is generated.
* @param endpointUrl - The endpoint for the topic or domain you wish to generate a shared access signature for.
* @param credential - The credential to use when generating the shared access signatrue.
* @param expiresOn - The time at which the shared access signature is no longer valid.
* @param options - Options to control how the signature is generated.
*/
export async function generateSharedAccessSignature(
endpointUrl: string,
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventgrid/eventgrid/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import { createClientLogger } from "@azure/logger";

/**
* The @azure/logger configuration for this package.
* The \@azure/logger configuration for this package.
*/
export const logger = createClientLogger("eventgrid");
12 changes: 6 additions & 6 deletions sdk/eventgrid/eventgrid/src/predicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export type KnownSystemEventTypes =
/**
* A mapping of event type names to event data type interfaces.
*
* @ignore
* @internal
*/
export interface SystemEventNameToEventData {
/** An interface for the event data of a "Microsoft.Communication.ChatMessageReceived" event. */
Expand Down Expand Up @@ -411,7 +411,7 @@ export interface SystemEventNameToEventData {
/**
* isCloudEventLike returns "true" when the event is a CloudEvent
*
* @param o Either an EventGrid our CloudEvent event.
* @param o - Either an EventGrid our CloudEvent event.
*/
function isCloudEventLike(
o: EventGridEvent<unknown> | CloudEvent<unknown>
Expand All @@ -424,8 +424,8 @@ function isCloudEventLike(
* TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to
* identify the underlying data
*
* @param eventType The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted"
* @param event The event to test.
* @param eventType - The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted"
* @param event - The event to test.
*/
export function isSystemEvent<T extends KnownSystemEventTypes>(
eventType: T,
Expand All @@ -437,8 +437,8 @@ export function isSystemEvent<T extends KnownSystemEventTypes>(
* TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to
* identify the underlying data
*
* @param eventType The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted"
* @param event The event to test.
* @param eventType - The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted"
* @param event - The event to test.
*/
export function isSystemEvent<T extends KnownSystemEventTypes>(
eventType: T,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class EventGridSharedAccessSignatureCredential implements SignatureCreden
* Create an instance of an EventGridSharedAccessSignatureCredential for use
* with a service client.
*
* @param {string} signature the signature to use in authentication
* @param signature - The signature to use in authentication
*/
constructor(signature: string) {
if (!signature) {
Expand All @@ -47,7 +47,7 @@ export class EventGridSharedAccessSignatureCredential implements SignatureCreden
* Updates will take effect upon the next request after
* updating the signature value.
*
* @param {string} newSignature the new signature value to be used
* @param newSignature - The new signature value to be used
*/
public update(newSignature: string): void {
this._signature = newSignature;
Expand Down
6 changes: 3 additions & 3 deletions sdk/eventgrid/eventgrid/src/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ type OperationTracingOptions = OperationOptions["tracingOptions"];

/**
* Creates a span using the global tracer.
* @ignore
* @param name The name of the operation being performed.
* @param tracingOptions The options for the underlying http request.
* @internal
* @param name - The name of the operation being performed.
* @param tracingOptions - The options for the underlying http request.
*/
export function createSpan<T extends OperationOptions>(
operationName: string,
Expand Down
4 changes: 2 additions & 2 deletions sdk/eventgrid/eventgrid/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { KeyCredential } from "@azure/core-auth";
*
* The service expects a UTC time, so this method returns a string based on the UTC time of the provided Date.
*
* @param d The Date object to convert to a string.
* @param d - The Date object to convert to a string.
*/
export function dateToServiceTimeString(d: Date): string {
const month = d.getUTCMonth() + 1; // getUTCMonth returns 0-11 not 1-12.
Expand All @@ -39,7 +39,7 @@ export function dateToServiceTimeString(d: Date): string {
* Returns `true` if the credential object is like the KeyCredential interface (i.e. it has a
* key property).
*
* @param credential the object to test
* @param credential - The object to test
*/
export function isKeyCredentialLike(o: unknown): o is KeyCredential {
const castO = o as {
Expand Down