firebase / firebase/firebase-admin-node

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

オープン
#2,412 コメント 2 件 リアクション 3 件 担当者 1 名 @lahirumaramba が担当を希望しています GitHub で見る
api: firestore type: feature request
主要言語
TypeScript
スター
1.7k
フォーク
419
平均マージ
3日 10時間
マージ済み PR(30日)
16

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。