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
According to the 1.0.0 Typescript definitions the context part of an event is defined as EventContext | undefined. For example:
constmyFunction=firestore.document(`collection/{documentId}`).onCreate((data,context)=>{// Check if context is defined?});
I have a hard time imagining why this would ever be undefined, so I am currently ignoring it.
Context as the second parameter to the handler function is optional, because you can supply a handler with just the data argument. But shouldn't that be solved via overloading? If I supply a function with both arguments then context should be guaranteed to exist, no?