Firebase Functions service.
Functions
| Function | Description |
|---|---|
| getFunctions(app) | Gets the Functions service for the default app or a given app.getFunctions() can be called with no arguments to access the default app's Functions service or as getFunctions(app) to access the Functions service associated with a specific app. |
Classes
| Class | Description |
|---|---|
| Functions | The Firebase Functions service interface. |
| TaskQueue | The TaskQueue interface. |
Interfaces
| Interface | Description |
|---|---|
| AbsoluteDelivery | Interface representing task options with absolute delivery. |
| DelayDelivery | Interface representing task options with delayed delivery. |
| TaskOptionsExperimental | Type representing experimental (beta) task options. |
Type Aliases
| Type Alias | Description |
|---|---|
| DeliverySchedule | Type representing delivery schedule options. DeliverySchedule is a union type of DelayDelivery and AbsoluteDelivery types. |
| TaskOptions | Type representing task options. |
getFunctions(app)
Gets the Functions service for the default app or a given app.
getFunctions() can be called with no arguments to access the default app's Functions service or as getFunctions(app) to access the Functions service associated with a specific app.
Signature:
export declare function getFunctions(app?: App): Functions;
Parameters
| Parameter | Type | Description |
|---|---|---|
| app | App | Optional app for which to return the Functions service. If not provided, the default Functions service is returned. |
Returns:
The default Functions service if no app is provided, or the Functions service associated with the provided app.
Example 1
// Get the `Functions` service for the default app
const defaultFunctions = getFunctions();
Example 2
// Get the `Functions` service for a given app
const otherFunctions = getFunctions(otherApp);
DeliverySchedule
Type representing delivery schedule options. DeliverySchedule is a union type of DelayDelivery and AbsoluteDelivery types.
Signature:
export type DeliverySchedule = DelayDelivery | AbsoluteDelivery;
TaskOptions
Type representing task options.
Signature:
export type TaskOptions = DeliverySchedule & TaskOptionsExperimental & {
dispatchDeadlineSeconds?: number;
id?: string;
headers?: Record<string, string>;
};