firebase / firebase/firebase-admin-node

[Firestore] Typescript error on date

Open
#1,965 3 comments 0 reactions 0 assignees View on GitHub
api: firestore needs-triage
Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
3d 10h
Merged PRs (30d)
16

Description

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:

```js
data.entryDate.seconds
```

and I get this typescript error:

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.