|
1 | | -// Copyright (c) Microsoft Corporation. |
2 | | -// Licensed under the MIT license. |
3 | | - |
4 | | -import { Disposable } from "./common/disposable.js"; |
5 | | - |
6 | | -/** |
7 | | - * Azure App Configuration provider. |
8 | | - */ |
9 | | -export type AzureAppConfiguration = { |
10 | | - /** |
11 | | - * API to trigger refresh operation. |
12 | | - */ |
13 | | - refresh(): Promise<void>; |
14 | | - |
15 | | - /** |
16 | | - * API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags. |
17 | | - * |
18 | | - * @param listener - Callback function to be registered. |
19 | | - * @param thisArg - Optional. Value to use as `this` when executing callback. |
20 | | - */ |
21 | | - onRefresh(listener: () => any, thisArg?: any): Disposable; |
22 | | -} & IGettable & ReadonlyMap<string, any> & IConfigurationObject; |
23 | | - |
24 | | -interface IConfigurationObject { |
25 | | - /** |
26 | | - * Construct configuration object based on Map-styled data structure and hierarchical keys. |
27 | | - * @param options - The options to control the conversion behavior. |
28 | | - */ |
29 | | - constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>; |
30 | | -} |
31 | | - |
32 | | -export interface ConfigurationObjectConstructionOptions { |
33 | | - /** |
34 | | - * The separator to use when converting hierarchical keys to object properties. |
35 | | - * Supported values: '.', ',', ';', '-', '_', '__', '/', ':'. |
36 | | - * If separator is undefined, '.' will be used by default. |
37 | | - */ |
38 | | - separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":"; |
39 | | -} |
40 | | - |
41 | | -interface IGettable { |
42 | | - /** |
43 | | - * Get the value of a key-value from the Map-styled data structure. |
44 | | - * @param key - The key of the key-value to be retrieved. |
45 | | - */ |
46 | | - get<T>(key: string): T | undefined; |
47 | | -} |
| 1 | +// Copyright (c) Microsoft Corporation. |
| 2 | +// Licensed under the MIT license. |
| 3 | + |
| 4 | +import { Disposable } from "./common/disposable.js"; |
| 5 | + |
| 6 | +/** |
| 7 | + * Azure App Configuration provider. |
| 8 | + */ |
| 9 | +export type AzureAppConfiguration = { |
| 10 | + /** |
| 11 | + * API to trigger refresh operation. |
| 12 | + */ |
| 13 | + refresh(): Promise<void>; |
| 14 | + |
| 15 | + /** |
| 16 | + * API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags. |
| 17 | + * |
| 18 | + * @param listener - Callback function to be registered. |
| 19 | + * @param thisArg - Optional. Value to use as `this` when executing callback. |
| 20 | + */ |
| 21 | + onRefresh(listener: () => any, thisArg?: any): Disposable; |
| 22 | +} & IGettable & ReadonlyMap<string, any> & IConfigurationObject; |
| 23 | + |
| 24 | +interface IConfigurationObject { |
| 25 | + /** |
| 26 | + * Construct configuration object based on Map-styled data structure and hierarchical keys. |
| 27 | + * @param options - The options to control the conversion behavior. |
| 28 | + */ |
| 29 | + constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>; |
| 30 | +} |
| 31 | + |
| 32 | +export interface ConfigurationObjectConstructionOptions { |
| 33 | + /** |
| 34 | + * The separator to use when converting hierarchical keys to object properties. |
| 35 | + * Supported values: '.', ',', ';', '-', '_', '__', '/', ':'. |
| 36 | + * If separator is undefined, '.' will be used by default. |
| 37 | + */ |
| 38 | + separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":"; |
| 39 | +} |
| 40 | + |
| 41 | +interface IGettable { |
| 42 | + /** |
| 43 | + * Get the value of a key-value from the Map-styled data structure. |
| 44 | + * @param key - The key of the key-value to be retrieved. |
| 45 | + */ |
| 46 | + get<T>(key: string): T | undefined; |
| 47 | +} |
0 commit comments