firebase / firebase/firebase-admin-node

[Firestore] Typescript error on date

Đang mở
#1,965 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: firestore needs-triage
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.