You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When env variable used as shown in Google Docs it doesn't compile with CallableOptions, however the same param is used without issues with HttpsOptions. CallableOptions extends HttpsOptions, so it should have the same behavior as HttpsOptions.
env variable should be assignable without compile errors.
[REQUIRED] Actual behavior
Type 'BooleanParam' is not assignable to type 'boolean | undefined'.ts(2322)
https.d.ts(111, 5): The expected type comes from property 'enforceAppCheck' which is declared here on type 'CallableOptions'
Were you able to successfully deploy your functions?
Function doesn't deploy due to compile issues.
FIX
To fix the issue we need to update the code below:
Hey @eli1stark thanks for noticing a feature gap! I've added a feature-request tag to this issue and hopefully we can get to it soon. Otherwise, if you (or anyone in the community) would like to take a crack at adding it, we'd love to have community contributions.
Related issues
[REQUIRED] Version Info
node: v20.7.0
firebase-functions: v4.5.0
firebase-admin: v11.11.1
[REQUIRED] Test case
Provided below.
[REQUIRED] Steps to reproduce
When env variable used as shown in Google Docs it doesn't compile with
CallableOptions
, however the same param is used without issues withHttpsOptions
.CallableOptions
extendsHttpsOptions
, so it should have the same behavior asHttpsOptions
.my_function.ts
.env
[REQUIRED] Expected behavior
env variable should be assignable without compile errors.
[REQUIRED] Actual behavior
Type 'BooleanParam' is not assignable to type 'boolean | undefined'.ts(2322)
https.d.ts(111, 5): The expected type comes from property 'enforceAppCheck' which is declared here on type 'CallableOptions'
Were you able to successfully deploy your functions?
Function doesn't deploy due to compile issues.
FIX
To fix the issue we need to update the code below:
to this code:
The text was updated successfully, but these errors were encountered: