-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
Description
Related issues
[REQUIRED] Version info
node:
v20.19.0
firebase-functions:
6.1.0
firebase-tools:
14.2.0
firebase-admin:
12.7.0
[REQUIRED] Test case
Would it be possible to re-export express.response so it can be used in user code for the function definition of the onRequest handler?
[REQUIRED] Steps to reproduce
// handler.ts
export async function myHandler(
request: functions.https.Request,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
response: any
)
// index.ts
export const foobar = onRequest(
secrets: [],
timeoutSeconds: 540,
minInstances: minInstancesConfig,
},
async (request, response) => await myHandler(request, response)
);[REQUIRED] Expected behavior
I'd prefer to have a type available for response instead of having to use any, ie functions.https.Response.
[REQUIRED] Actual behavior
Response is taken from Express 4.x. My project already includes Express 5.x, so it's awkward to include it separately, and it would be cleaner if firebase-functions just provided the type interface.
Were you able to successfully deploy your functions?
No problem here.
Reactions are currently unavailable