mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Delete azurecore value provider and simplify type (#17543)
This commit is contained in:
@@ -27,12 +27,16 @@ declare module 'resource-deployment' {
|
||||
export type InputValueType = string | number | boolean | undefined;
|
||||
|
||||
export interface IValueProvider {
|
||||
/**
|
||||
* The ID associated with this value provider. Fields use this ID in the package.json to indicate which provider to use to get the value for that field.
|
||||
* Each ID must be globally unique - an error will be thrown if the same ID is already registered.
|
||||
*/
|
||||
readonly id: string,
|
||||
/**
|
||||
* Gets a calculated value based on the given input values.
|
||||
* @param triggerValues A map of the trigger field names and their current values specified in the valueProvider field info
|
||||
*/
|
||||
getValue(triggerValues: string | {[key: string]: InputValueType}): Promise<InputValueType>;
|
||||
getValue(triggerValues: {[key: string]: InputValueType}): Promise<InputValueType>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,6 +48,12 @@ declare module 'resource-deployment' {
|
||||
|
||||
export interface IExtension {
|
||||
registerOptionsSourceProvider(provider: IOptionsSourceProvider): vscode.Disposable,
|
||||
/**
|
||||
* Registers a value provider that resource deployment definitions can use to dynamically fetch the value for specified fields.
|
||||
* @param provider The provider to register
|
||||
* @returns A disposable is returned that will unregister the provider when is disposed - this should be used to ensure
|
||||
* that the provider is unregistered when the extension is uninstalled/deactivated.
|
||||
*/
|
||||
registerValueProvider(provider: IValueProvider): vscode.Disposable
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user