Skip to content

Commit 6a52e11

Browse files
Prettier
1 parent 1f65d46 commit 6a52e11

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

packages/firestore/lite/src/api/components.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ export function getDatastore(firestore: Firestore): Datastore {
7979
* Removes all components associated with the provided instance. Must be called
8080
* when the Firestore instance is terminated.
8181
*/
82-
export async function removeComponents(firestore: Firestore): Promise<void> {
83-
const datastorePromise = await datastoreInstances.get(firestore);
84-
if (datastorePromise) {
82+
export function removeComponents(firestore: Firestore): void {
83+
const datastore = datastoreInstances.get(firestore);
84+
if (datastore) {
8585
logDebug(LOG_TAG, 'Removing Datastore');
8686
datastoreInstances.delete(firestore);
87-
return (await datastorePromise).terminate();
87+
datastore.terminate();
8888
}
8989
}

packages/firestore/lite/src/api/database.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ export class Firestore
110110
* Only ever called once.
111111
*/
112112
protected _terminate(): Promise<void> {
113-
return removeComponents(this);
113+
removeComponents(this);
114+
return Promise.resolve();
114115
}
115116

116117
// TODO(firestoreexp): `deleteApp()` should call the delete method above,

packages/firestore/src/platform/node_lite/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export { newConnectivityMonitor } from '../browser/connection';
2525

2626
/** Initializes the HTTP connection for the REST API. */
2727
export function newConnection(databaseInfo: DatabaseInfo): Connection {
28-
// node-fetch is meant to be API compatible with `fetch`, but its type don't
28+
// node-fetch is meant to be API compatible with `fetch`, but its type doesn't
2929
// match 100%.
3030
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3131
return new FetchConnection(databaseInfo, nodeFetch as any);

packages/firestore/src/remote/datastore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import { Query, queryToTarget } from '../core/query';
4747
* for the rest of the client SDK architecture to consume.
4848
*/
4949
export abstract class Datastore {
50-
abstract terminate(): Promise<void>;
50+
abstract terminate(): void;
5151
}
5252

5353
/**
@@ -125,7 +125,7 @@ class DatastoreImpl extends Datastore {
125125
});
126126
}
127127

128-
async terminate(): Promise<void> {
128+
terminate(): void {
129129
this.terminated = false;
130130
}
131131
}

packages/firestore/test/unit/specs/spec_test_components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class MockOnlineComponentProvider extends OnlineComponentProvider {
124124
constructor(private readonly connection: MockConnection) {
125125
super();
126126
}
127-
127+
128128
createDatastore(cfg: ComponentConfiguration): Datastore {
129129
const serializer = new JsonProtoSerializer(
130130
cfg.databaseInfo.databaseId,

packages/firestore/test/unit/specs/spec_test_runner.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ abstract class TestRunner {
258258
};
259259

260260
this.connection = new MockConnection(this.queue);
261-
262-
const onlineComponentProvider = new MockOnlineComponentProvider(this.connection);
261+
262+
const onlineComponentProvider = new MockOnlineComponentProvider(
263+
this.connection
264+
);
263265
const offlineComponentProvider = await this.initializeOfflineComponentProvider(
264266
onlineComponentProvider,
265267
configuration,

0 commit comments

Comments
 (0)