mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Update typings for getAzureFunctions request (#19556)
This commit is contained in:
@@ -44,7 +44,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined):
|
||||
}
|
||||
|
||||
// get all the Azure functions in the file
|
||||
const azureFunctions = getAzureFunctionsResult.azureFunctions;
|
||||
const azureFunctions = getAzureFunctionsResult.azureFunctions.map(af => typeof (af) === 'string' ? af : af.name);
|
||||
|
||||
if (azureFunctions.length === 0) {
|
||||
void vscode.window.showErrorMessage(constants.noAzureFunctionsInFile);
|
||||
|
||||
18
extensions/sql-bindings/src/sql-bindings.d.ts
vendored
18
extensions/sql-bindings/src/sql-bindings.d.ts
vendored
@@ -121,14 +121,26 @@ declare module 'sql-bindings' {
|
||||
filePath: string;
|
||||
}
|
||||
|
||||
export interface AzureFunction {
|
||||
/**
|
||||
* The name of the function
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The route of the function if it has an HTTP trigger with a route specified
|
||||
*/
|
||||
route?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Result from a get Azure Functions request
|
||||
*/
|
||||
export interface GetAzureFunctionsResult extends ResultStatus {
|
||||
export interface GetAzureFunctionsResult {
|
||||
/**
|
||||
* Array of names of Azure Functions in the file
|
||||
* Array of Azure Functions in the file
|
||||
* Note : The string list response will eventually be deprecated and replaced completely with the AzureFunction list
|
||||
*/
|
||||
azureFunctions: string[];
|
||||
azureFunctions: string[] | AzureFunction[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user