Skip to content

[FR] Show warning if passing undefined value to Firestore's update() #2284

@risalfajar

Description

@risalfajar

Is your feature request related to a problem? Please describe.
I'm always frustrated when passing an undefined value to update() call without any issue in the IDE/lint, but then getting a runtime error after the function is deployed.

Describe the solution you'd like
Show warning in IDE if an undefined value is passed to update()

const value: string | undefined = undefined

admin.firestore(app)
    .collection("collection")
    .doc("docId")
    .update({
        id: value // show a warning here
    })

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions