@@ -226,7 +226,7 @@ export type HttpsFunction = ((
226
226
/**
227
227
* Creates a callable method for clients to call using a Firebase SDK.
228
228
*/
229
- export interface CallableFunction < T , Return , Stream = string > extends HttpsFunction {
229
+ export interface CallableFunction < T , Return , Stream = unknown > extends HttpsFunction {
230
230
/** Executes the handler function with the provided data as input. Used for unit testing.
231
231
* @param data - An input for the handler function.
232
232
* @returns The output of the handler function.
@@ -360,7 +360,7 @@ export function onRequest(
360
360
* @param handler - A function that takes a {@link https.CallableRequest}.
361
361
* @returns A function that you can export and deploy.
362
362
*/
363
- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
363
+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
364
364
opts : CallableOptions ,
365
365
handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
366
366
) : 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>(
370
370
* @param handler - A function that takes a {@link https.CallableRequest}.
371
371
* @returns A function that you can export and deploy.
372
372
*/
373
- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
373
+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
374
374
handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
375
375
) : 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 > (
377
377
optsOrHandler : CallableOptions | ( ( request : CallableRequest < T > ) => Return ) ,
378
378
handler ?: ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
379
379
) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > {
0 commit comments