Skip to content

Commit 0adf2ff

Browse files
authored
update doc comments per TSDoc standard (#36)
1 parent f54e65b commit 0adf2ff

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

src/AzureAppConfigurationOptions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ export const MaxRetryDelayInMs = 60000;
1111
export interface AzureAppConfigurationOptions {
1212
/**
1313
* Specify what key-values to include in the configuration provider.
14+
*
15+
* @remarks
1416
* If no selectors are specified then all key-values with no label will be included.
1517
*/
1618
selectors?: SettingSelector[];
1719

1820
/**
1921
* Specifies prefixes to be trimmed from the keys of all key-values retrieved from Azure App Configuration.
22+
*
23+
* @remarks
2024
* This is useful when you want to remove a common prefix from all keys to avoid repetition.
2125
* The provided prefixes will be sorted in descending order and the longest matching prefix will be trimmed first.
2226
*/

src/load.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ const MinDelayForUnhandedError: number = 5000; // 5 seconds
1616
* @param options Optional parameters.
1717
*/
1818
export async function load(connectionString: string, options?: AzureAppConfigurationOptions): Promise<AzureAppConfiguration>;
19+
1920
/**
2021
* Loads the data from Azure App Configuration service and returns an instance of AzureAppConfiguration.
2122
* @param endpoint The URL to the App Configuration store.
2223
* @param credential The credential to use to connect to the App Configuration store.
2324
* @param options Optional parameters.
2425
*/
2526
export async function load(endpoint: URL | string, credential: TokenCredential, options?: AzureAppConfigurationOptions): Promise<AzureAppConfiguration>;
27+
2628
export async function load(
2729
connectionStringOrEndpoint: string | URL,
2830
credentialOrOptions?: TokenCredential | AzureAppConfigurationOptions,

src/types.ts

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,50 @@
22
// Licensed under the MIT license.
33

44
/**
5-
* SettingSelector is used to select key-values from Azure App Configuration.
6-
* It is used to filter key-values based on keys and labels.
7-
*
8-
* @property keyFilter:
9-
* The key filter to apply when querying Azure App Configuration for key-values.
10-
* An asterisk `*` can be added to the end to return all key-values whose key begins with the key filter.
11-
* e.g. key filter `abc*` returns all key-values whose key starts with `abc`.
12-
* A comma `,` can be used to select multiple key-values. Comma separated filters must exactly match a key to select it.
13-
* Using asterisk to select key-values that begin with a key filter while simultaneously using comma separated key filters is not supported.
14-
* E.g. the key filter `abc*,def` is not supported. The key filters `abc*` and `abc,def` are supported.
15-
* For all other cases the characters: asterisk `*`, comma `,`, and backslash `\` are reserved. Reserved characters must be escaped using a backslash (\).
16-
* e.g. the key filter `a\\b\,\*c*` returns all key-values whose key starts with `a\b,*c`.
17-
*
18-
* @property labelFilter:
19-
* The label filter to apply when querying Azure App Configuration for key-values.
20-
* By default, the "null label" will be used, matching key-values without a label.
21-
* The characters asterisk `*` and comma `,` are not supported.
22-
* Backslash `\` character is reserved and must be escaped using another backslash `\`.
5+
* SettingSelector is used to select key-values from Azure App Configuration based on keys and labels.
236
*/
24-
export type SettingSelector = { keyFilter: string, labelFilter?: string };
7+
export type SettingSelector = {
8+
/**
9+
* The key filter to apply when querying Azure App Configuration for key-values.
10+
*
11+
* @remarks
12+
* An asterisk `*` can be added to the end to return all key-values whose key begins with the key filter.
13+
* e.g. key filter `abc*` returns all key-values whose key starts with `abc`.
14+
* A comma `,` can be used to select multiple key-values. Comma separated filters must exactly match a key to select it.
15+
* Using asterisk to select key-values that begin with a key filter while simultaneously using comma separated key filters is not supported.
16+
* E.g. the key filter `abc*,def` is not supported. The key filters `abc*` and `abc,def` are supported.
17+
* For all other cases the characters: asterisk `*`, comma `,`, and backslash `\` are reserved. Reserved characters must be escaped using a backslash (\).
18+
* e.g. the key filter `a\\b\,\*c*` returns all key-values whose key starts with `a\b,*c`.
19+
*/
20+
keyFilter: string,
21+
22+
/**
23+
* The label filter to apply when querying Azure App Configuration for key-values.
24+
*
25+
* @remarks
26+
* By default, the "null label" will be used, matching key-values without a label.
27+
* The characters asterisk `*` and comma `,` are not supported.
28+
* Backslash `\` character is reserved and must be escaped using another backslash `\`.
29+
*/
30+
labelFilter?: string
31+
};
2532

2633
/**
2734
* KeyFilter is used to filter key-values based on keys.
28-
*
29-
* @property Any:
30-
* Matches all key-values.
3135
*/
3236
export enum KeyFilter {
37+
/**
38+
* Matches all key-values.
39+
*/
3340
Any = "*"
3441
}
3542

3643
/**
3744
* LabelFilter is used to filter key-values based on labels.
38-
*
39-
* @property Null:
40-
* Matches key-values without a label.
4145
*/
4246
export enum LabelFilter {
47+
/**
48+
* Matches key-values without a label.
49+
*/
4350
Null = "\0"
4451
}

0 commit comments

Comments
 (0)