From 7c31f91c76ca9510cc59e67f86c5f984af7bf30b Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Tue, 19 Jan 2021 15:22:16 -0600 Subject: [PATCH] Remove toJSON() from index files --- packages/app-types/index.d.ts | 2 -- packages/firestore/src/lite/database.ts | 1 + packages/firestore/test/unit/api/database.test.ts | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/app-types/index.d.ts b/packages/app-types/index.d.ts index b7043531126..4aad68c7173 100644 --- a/packages/app-types/index.d.ts +++ b/packages/app-types/index.d.ts @@ -112,8 +112,6 @@ export interface FirebaseNamespace { // Sets log handler for all Firebase components. onLog(logCallback: LogCallback, options?: LogOptions): void; - toJSON(): object; - // The current SDK version. SDK_VERSION: string; } diff --git a/packages/firestore/src/lite/database.ts b/packages/firestore/src/lite/database.ts index 58a439d89bc..6ecb3d50647 100644 --- a/packages/firestore/src/lite/database.ts +++ b/packages/firestore/src/lite/database.ts @@ -136,6 +136,7 @@ export class FirebaseFirestore implements FirestoreService { toJSON(): object { return { + app: this.app.name, databaseId: this._databaseId, settings: this._settings }; diff --git a/packages/firestore/test/unit/api/database.test.ts b/packages/firestore/test/unit/api/database.test.ts index ee8cfac8b52..f01c5d509eb 100644 --- a/packages/firestore/test/unit/api/database.test.ts +++ b/packages/firestore/test/unit/api/database.test.ts @@ -83,9 +83,6 @@ describe('DocumentSnapshot', () => { it('JSON.stringify() does not throw', () => { JSON.stringify(documentSnapshot('foo/bar', { a: 1 }, true)); - JSON.stringify(documentSnapshot('foo/bar', { a: 1 }, false)); - JSON.stringify(documentSnapshot('foo/bar', null, true)); - JSON.stringify(documentSnapshot('foo/bar', null, false)); }); });