(BETA) The callback passed to the CloudFunction constructor. Use run to test a function.
CloudFunction.__endpoint
Signature:
__endpoint:ManifestEndpoint;
CloudFunction.__trigger
Signature:
__trigger?:unknown;
CloudFunction.run()
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The callback passed to the CloudFunction constructor. Use run to test a function.
Signature:
run(event:EventType):any|Promise<any>;
Parameters
Parameter
Type
Description
event
EventType
The parsed event to handle.
Returns:
any | Promise<any>
Any return value. Cloud Functions awaits any promise before shutting down your function. Resolved return values are only used for unit testing purposes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-14 UTC."],[],[],null,["\u003e This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.\n\nA handler for CloudEvents.\n\n**Signature:** \n\n export interface CloudFunction\u003cEventType extends CloudEvent\u003cunknown\u003e\u003e \n\nProperties\n\nMethods\n\nCloudFunction.__endpoint\n\n**Signature:** \n\n __endpoint: ManifestEndpoint;\n\nCloudFunction.__trigger\n\n**Signature:** \n\n __trigger?: unknown;\n\nCloudFunction.run() This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.\n\nThe callback passed to the `CloudFunction` constructor. Use `run` to test a function.\n\n**Signature:** \n\n run(event: EventType): any | Promise\u003cany\u003e;\n\nParameters\n\n**Returns:**\n\nany \\| Promise\\\u003cany\\\u003e\n\nAny return value. Cloud Functions awaits any promise before shutting down your function. Resolved return values are only used for unit testing purposes."]]