@@ -258,7 +258,7 @@ export type HttpsFunction = ((
258
258
/**
259
259
* Creates a callable method for clients to call using a Firebase SDK.
260
260
*/
261
- export interface CallableFunction < T , Return , Stream = string > extends HttpsFunction {
261
+ export interface CallableFunction < T , Return , Stream = unknown > extends HttpsFunction {
262
262
/** Executes the handler function with the provided data as input. Used for unit testing.
263
263
* @param data - An input for the handler function.
264
264
* @returns The output of the handler function.
@@ -392,7 +392,7 @@ export function onRequest(
392
392
* @param handler - A function that takes a {@link https.CallableRequest}.
393
393
* @returns A function that you can export and deploy.
394
394
*/
395
- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
395
+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
396
396
opts : CallableOptions < T > ,
397
397
handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
398
398
) : 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>(
402
402
* @param handler - A function that takes a {@link https.CallableRequest}.
403
403
* @returns A function that you can export and deploy.
404
404
*/
405
- export function onCall < T = any , Return = any | Promise < any > , Stream = string > (
405
+ export function onCall < T = any , Return = any | Promise < any > , Stream = unknown > (
406
406
handler : ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
407
407
) : 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 > (
409
409
optsOrHandler : CallableOptions < T > | ( ( request : CallableRequest < T > ) => Return ) ,
410
410
handler ?: ( request : CallableRequest < T > , response ?: CallableResponse < Stream > ) => Return
411
411
) : CallableFunction < T , Return extends Promise < unknown > ? Return : Promise < Return > > {
0 commit comments