@@ -226,7 +226,7 @@ export type HttpsFunction = ((
226226/**
227227 * Creates a callable method for clients to call using a Firebase SDK.
228228 */
229- export interface CallableFunction < T , Return , Stream = string > extends HttpsFunction {
229+ export interface CallableFunction < T , Return , Stream = unknown > extends HttpsFunction {
230230 /** Executes the handler function with the provided data as input. Used for unit testing.
231231 * @param data - An input for the handler function.
232232 * @returns The output of the handler function.
@@ -360,7 +360,7 @@ export function onRequest(
360360 * @param handler - A function that takes a {@link https.CallableRequest}.
361361 * @returns A function that you can export and deploy.
362362 */
363- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
363+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
364364 opts : CallableOptions ,
365365 handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
366366) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > , Stream > ;
@@ -370,10 +370,10 @@ export function onCall<T = any, Return = any | Promise<any>, Stream = string>(
370370 * @param handler - A function that takes a {@link https.CallableRequest}.
371371 * @returns A function that you can export and deploy.
372372 */
373- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
373+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
374374 handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
375375) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > ;
376- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
376+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
377377 optsOrHandler : CallableOptions | ( ( request : CallableRequest < T > ) => Return ) ,
378378 handler ?: ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
379379) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > {
0 commit comments