I have a cloud function that takes an email and returns the user info, including the uid.
The function is declared like this:
const getUserByEmail = httpsCallable(functions, 'getUserByEmail')
const user = await getUserByEmail({
email: email,
})
But when I try to read "user.data.id" typescript yells at me because:
"Object is of type 'unknown'.ts(2571) (property)
HttpsCallableResult.data: unknown Data returned from callable function.
What am I missing?
edit: of course I tried "user: any" and TS is happy, but it's not a great solution.