@@ -258,7 +258,7 @@ export type HttpsFunction = ((
258258/**
259259 * Creates a callable method for clients to call using a Firebase SDK.
260260 */
261- export interface CallableFunction < T , Return , Stream = string > extends HttpsFunction {
261+ export interface CallableFunction < T , Return , Stream = unknown > extends HttpsFunction {
262262 /** Executes the handler function with the provided data as input. Used for unit testing.
263263 * @param data - An input for the handler function.
264264 * @returns The output of the handler function.
@@ -392,7 +392,7 @@ export function onRequest(
392392 * @param handler - A function that takes a {@link https.CallableRequest}.
393393 * @returns A function that you can export and deploy.
394394 */
395- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
395+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
396396 opts : CallableOptions < T > ,
397397 handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
398398) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > , Stream > ;
@@ -402,10 +402,10 @@ export function onCall<T = any, Return = any | Promise<any>, Stream = string>(
402402 * @param handler - A function that takes a {@link https.CallableRequest}.
403403 * @returns A function that you can export and deploy.
404404 */
405- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
405+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
406406 handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
407407) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > ;
408- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
408+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
409409 optsOrHandler : CallableOptions < T > | ( ( request : CallableRequest < T > ) => Return ) ,
410410 handler ?: ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
411411) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > {
0 commit comments