firebase / firebase/firebase-admin-node

[FR] adding toJSON property to the Admin SDK Timestamp class

Đang mở
#2,412 2 bình luận 3 reaction 1 người được giao Được @lahirumaramba nhận Xem trên GitHub
api: firestore type: feature request
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ả

**Is your feature request related to a problem? Please describe.**
Working in monorepos or other situations with shared Typescript interfaces is complicated because toJSON property is missing on the Admin SDK Timestamp definition

Can firebase-admin package and firebase package share same type definition of some common class?
For example firebase-admin Timestamp class is defined [here](https://cloud.google.com/nodejs/docs/reference/firestore/latest/firestore/timestamp) but firebase Timestamp class is defined [here](https://firebase.google.com/docs/reference/node/firebase.firestore.Timestamp) and they are different.

**Describe the solution you'd like**
adding toJSON property to the Admin SDK Timestamp class to make it compatible to firebase Timestamp class.

**Describe alternatives you've considered**
Split the common class type definition to a separate package?

**Additional context**
Discussed at #1404 before, but no contributor response after [hiranya911](https://github.com/hiranya911) is not active in firebase project.

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.