Creates a callable method for clients to call using a Firebase SDK.
Signature:
export interface CallableFunction<T, Return, Stream = unknown> extends HttpsFunction
Extends: HttpsFunction
Methods
Method | Description |
---|---|
run(request) | Executes the handler function with the provided data as input. Used for unit testing. |
stream(request, response) |
https.CallableFunction.run()
Executes the handler function with the provided data as input. Used for unit testing.
Signature:
run(request: CallableRequest<T>): Return;
Parameters
Parameter | Type | Description |
---|---|---|
request | CallableRequest<T> |
Returns:
Return
The output of the handler function.
https.CallableFunction.stream()
Signature:
stream(request: CallableRequest<T>, response: CallableResponse<Stream>): {
stream: AsyncIterator<Stream>;
output: Return;
};
Parameters
Parameter | Type | Description |
---|---|---|
request | CallableRequest<T> | |
response | CallableResponse<Stream> |
Returns:
{ stream: AsyncIterator<Stream>; output: Return; }