1 | // Copyright (c) .NET Foundation. All rights reserved.
|
2 | // Licensed under the MIT License.
|
3 |
|
4 | import { Context } from './Context';
|
5 |
|
6 | export * from './Context';
|
7 | export * from './http';
|
8 | export * from './timer';
|
9 |
|
10 | /**
|
11 | * Sets the programming model contained in this package to be the one used by the Azure Functions worker
|
12 | */
|
13 | export declare function setup(): void;
|
14 |
|
15 | /**
|
16 | * Interface for your Azure Function code. This function must be exported (via module.exports or exports)
|
17 | * and will execute when triggered. It is recommended that you declare this function as async, which
|
18 | * implicitly returns a Promise.
|
19 | * @param context Context object passed to your function from the Azure Functions runtime.
|
20 | * @param {any[]} args Optional array of input and trigger binding data. These binding data are passed to the
|
21 | * function in the same order that they are defined in function.json. Valid input types are string, HttpRequest,
|
22 | * and Buffer.
|
23 | * @returns Output bindings (optional). If you are returning a result from a Promise (or an async function), this
|
24 | * result will be passed to JSON.stringify unless it is a string, Buffer, ArrayBufferView, or number.
|
25 | */
|
26 | export type AzureFunction = (context: Context, ...args: any[]) => Promise<any> | void;
|