Skip to content

[Firestore] Typescript error on date #1965

@electroheadfx

Description

@electroheadfx

My environment

  • Operating System version: macOS Monterey
  • Firebase SDK version: 11.2.0
  • Firebase Product: Firestore
  • Node.js version: v16.17.1
  • NPM version: 8.19.2

Steps to reproduce:

Just request a document with a timestamp, and get the seconds on the object:

data.entryDate.seconds

and I get this typescript error:

Any
Property 'seconds' does not exist on type 'string'.
Translation: You're trying to access seconds on an object that doesn't contain it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions