firebase / firebase/firebase-admin-node

[Firestore] Typescript error on date

Aperta
#1,965 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: firestore needs-triage
Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
3g 10h
PR unite (30g)
16

Descrizione

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.
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.