Skip to content

Commit 43d9c79

Browse files
authored
[Cosmos] TSDoc compliance (Azure#13849)
1 parent 52d6213 commit 43d9c79

File tree

69 files changed

+273
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+273
-496
lines changed

sdk/cosmosdb/cosmos/consumer-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const execa = require("execa");
22

3-
let versions = ["3.1", "3.9"];
3+
let versions = ["3.9"];
44

55
if (!process.env.SKIP_LATEST) {
66
versions.push("latest");
@@ -17,11 +17,11 @@ async function exec(cmd) {
1717
try {
1818
console.log("Running typescript consumer test against", versions);
1919
for (const version of versions) {
20-
console.log(`Compling with typescript@${version} - Basic`);
20+
console.log(`Compiling with typescript@${version} - Basic`);
2121
await exec(
2222
`npx -p typescript@${version} tsc ./test.ts --allowSyntheticDefaultImports true --target ES5`
2323
);
24-
console.log(`Compling with typescript@${version} - Custom lib`);
24+
console.log(`Compiling with typescript@${version} - Custom lib`);
2525
await exec(
2626
`npx -p typescript@${version} tsc ./test.ts --allowSyntheticDefaultImports true --lib es2018`
2727
);

sdk/cosmosdb/cosmos/review/cosmos.api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ export class GlobalEndpointManager {
723723
constructor(options: CosmosClientOptions, readDatabaseAccount: (opts: RequestOptions) => Promise<ResourceResponse<DatabaseAccount>>);
724724
// (undocumented)
725725
canUseMultipleWriteLocations(resourceType?: ResourceType, operationType?: OperationType): boolean;
726-
// (undocumented)
727726
enableEndpointDiscovery: boolean;
728727
getReadEndpoint(): Promise<string>;
729728
// (undocumented)

sdk/cosmosdb/cosmos/src/ChangeFeedIterator.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ export class ChangeFeedIterator<T> {
2323

2424
/**
2525
* @internal
26-
* @hidden
27-
*
28-
* @param clientContext
29-
* @param resourceId
30-
* @param resourceLink
31-
* @param isPartitionedContainer
32-
* @param changeFeedOptions
3326
*/
3427
constructor(
3528
private clientContext: ClientContext,

sdk/cosmosdb/cosmos/src/ChangeFeedResponse.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ import { CosmosHeaders } from "./queryExecutionContext";
99
export class ChangeFeedResponse<T> {
1010
/**
1111
* @internal
12-
* @hidden
13-
*
14-
* @param result
15-
* @param count
16-
* @param statusCode
17-
* @param headers
1812
*/
1913
constructor(
2014
/**

sdk/cosmosdb/cosmos/src/ClientContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ export class ClientContext {
505505

506506
/**
507507
* Gets the Database account information.
508-
* @param {string} [options.urlConnection] - The endpoint url whose database account needs to be retrieved. \
508+
* @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved.
509509
* If not present, current client's url will be used.
510510
*/
511511
public async getDatabaseAccount(

sdk/cosmosdb/cosmos/src/CosmosClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class CosmosClient {
5656
constructor(connectionString: string);
5757
/**
5858
* Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use.
59-
* @param options bag of options - require at least endpoint and auth to be configured
59+
* @param options - bag of options; require at least endpoint and auth to be configured
6060
*/
6161
constructor(options: CosmosClientOptions); // tslint:disable-line:unified-signatures
6262
constructor(optionsOrConnectionString: string | CosmosClientOptions) {
@@ -131,7 +131,7 @@ export class CosmosClient {
131131
*
132132
* This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object.
133133
*
134-
* @param id The id of the database.
134+
* @param id - The id of the database.
135135
* @example Create a new container off of an existing database
136136
* ```typescript
137137
* const container = client.database("<database id>").containers.create("<container id>");
@@ -148,7 +148,7 @@ export class CosmosClient {
148148

149149
/**
150150
* Used for reading, or updating a existing offer by id.
151-
* @param id The id of the offer.
151+
* @param id - The id of the offer.
152152
*/
153153
public offer(id: string) {
154154
return new Offer(this, id, this.clientContext);

sdk/cosmosdb/cosmos/src/CosmosClientOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export interface CosmosClientOptions {
2929
* Allows users to generating their own auth tokens, potentially using a separate service
3030
*/
3131
tokenProvider?: TokenProvider;
32-
/** AAD token from @azure/identity
33-
* Obtain a credential object by creating an @azure/identity credential object
32+
/** AAD token from `@azure/identity`
33+
* Obtain a credential object by creating an `@azure/identity` credential object
3434
* We will then use your credential object and a scope URL (your cosmos db endpoint)
3535
* to authenticate requests to Cosmos
3636
* This feature is in private preview and not yet available for every Cosmos account

sdk/cosmosdb/cosmos/src/auth.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ export type TokenProvider = (requestInfo: RequestInfo) => Promise<string>;
2424

2525
/**
2626
* @hidden
27-
* @param clientOptions
28-
* @param verb
29-
* @param path
30-
* @param resourceId
31-
* @param resourceType
32-
* @param headers
3327
*/
3428
export async function setAuthorizationHeader(
3529
clientOptions: CosmosClientOptions,
@@ -102,9 +96,6 @@ export async function setAuthorizationTokenHeaderUsingMasterKey(
10296

10397
/**
10498
* @hidden
105-
* @param resourceTokens
106-
* @param path
107-
* @param resourceId
10899
*/
109100
// TODO: Resource tokens
110101
export function getAuthorizationTokenUsingResourceTokens(

sdk/cosmosdb/cosmos/src/client/Conflict/Conflict.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export class Conflict {
2121
}
2222
/**
2323
* @hidden
24-
* @param container The parent {@link Container}.
25-
* @param id The id of the given {@link Conflict}.
24+
* @param container - The parent {@link Container}.
25+
* @param id - The id of the given {@link Conflict}.
2626
*/
2727
constructor(
2828
public readonly container: Container,
@@ -32,7 +32,6 @@ export class Conflict {
3232

3333
/**
3434
* Read the {@link ConflictDefinition} for the given {@link Conflict}.
35-
* @param options
3635
*/
3736
public async read(options?: RequestOptions): Promise<ConflictResponse> {
3837
const path = getPathFromLink(this.url, ResourceType.conflicts);
@@ -49,7 +48,6 @@ export class Conflict {
4948

5049
/**
5150
* Delete the given {@link ConflictDefinition}.
52-
* @param options
5351
*/
5452
public async delete(options?: RequestOptions): Promise<ConflictResponse> {
5553
const path = getPathFromLink(this.url);

sdk/cosmosdb/cosmos/src/client/Conflict/Conflicts.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ export class Conflicts {
2222

2323
/**
2424
* Queries all conflicts.
25-
* @param query Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.
26-
* @param options Use to set options like response page size, continuation tokens, etc.
25+
* @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.
26+
* @param options - Use to set options like response page size, continuation tokens, etc.
2727
* @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.
2828
*/
2929
public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator<any>;
3030
/**
3131
* Queries all conflicts.
32-
* @param query Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.
33-
* @param options Use to set options like response page size, continuation tokens, etc.
32+
* @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.
33+
* @param options - Use to set options like response page size, continuation tokens, etc.
3434
* @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.
3535
*/
3636
public query<T>(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator<T>;
@@ -52,7 +52,7 @@ export class Conflicts {
5252

5353
/**
5454
* Reads all conflicts
55-
* @param options Use to set options like response page size, continuation tokens, etc.
55+
* @param options - Use to set options like response page size, continuation tokens, etc.
5656
*/
5757
public readAll(options?: FeedOptions): QueryIterator<ConflictDefinition & Resource> {
5858
return this.query<ConflictDefinition & Resource>(undefined, options);

0 commit comments

Comments
 (0)