Skip to content

Commit 5df33ec

Browse files
committed
Lint fixes.
1 parent ab90498 commit 5df33ec

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

packages/firestore/src/api/snapshot.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ import {
2828
SetOptions,
2929
WithFieldValue
3030
} from '../lite-api/reference';
31+
import { LiteUserDataWriter } from '../lite-api/reference_impl';
3132
import {
3233
DocumentSnapshot as LiteDocumentSnapshot,
3334
fieldPathFromArgument,
3435
FirestoreDataConverter as LiteFirestoreDataConverter
3536
} from '../lite-api/snapshot';
3637
import { UntypedFirestoreDataConverter } from '../lite-api/user_data_reader';
3738
import { AbstractUserDataWriter } from '../lite-api/user_data_writer';
38-
import { LiteUserDataWriter } from '../lite-api/reference_impl';
3939
import { Document } from '../model/document';
4040
import { DocumentKey } from '../model/document_key';
4141
import { newSerializer } from '../platform/serializer';
@@ -574,11 +574,8 @@ export class DocumentSnapshot<
574574
bundleString = value;
575575
}
576576
}
577-
if(error) {
578-
throw new FirestoreError(
579-
Code.INVALID_ARGUMENT,
580-
error
581-
);
577+
if (error) {
578+
throw new FirestoreError(Code.INVALID_ARGUMENT, error);
582579
}
583580
const serializer = newSerializer(db._databaseId);
584581
const reader = createBundleReaderSync(bundleString, serializer);

packages/firestore/src/core/bundle_impl.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ export class BundleConverterImpl implements BundleConverter {
7777
}
7878
}
7979

80-
toDocumentSnapshotData(docMetadata: BundledDocumentMetadata, bundledDoc: BundledDocument) : {
81-
documentKey: DocumentKey,
82-
mutableDoc: MutableDocument,
80+
toDocumentSnapshotData(
81+
docMetadata: BundledDocumentMetadata,
82+
bundledDoc: BundledDocument
83+
): {
84+
documentKey: DocumentKey;
85+
mutableDoc: MutableDocument;
8386
} {
8487
const bundleConverter = new BundleConverterImpl(this.serializer);
8588
const documentKey = bundleConverter.toDocumentKey(docMetadata.name!);

packages/firestore/src/core/firestore_client.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ import { TransactionRunner } from './transaction_runner';
9898
import { View } from './view';
9999
import { ViewSnapshot } from './view_snapshot';
100100

101-
import { ExpUserDataWriter } from '../api/reference_impl';
102-
103101
const LOG_TAG = 'FirestoreClient';
104102
export const MAX_CONCURRENT_LIMBO_RESOLUTIONS = 100;
105103

packages/firestore/src/util/bundle_reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ export interface BundleReaderSync {
8484
* Returns BundleElements parsed from the bundle. Returns an empty array if no bundle elements
8585
* exist.
8686
*/
87-
getElements(): Array<SizedBundleElement>;
87+
getElements(): SizedBundleElement[];
8888
}

packages/firestore/src/util/bundle_reader_sync_impl.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@ import { BundleReaderSync, SizedBundleElement } from './bundle_reader';
2525
*/
2626
export class BundleReaderSyncImpl implements BundleReaderSync {
2727
private metadata: BundleMetadata;
28-
private elements: Array<SizedBundleElement>;
28+
private elements: SizedBundleElement[];
2929
private cursor: number;
3030
constructor(
3131
private bundleData: string,
3232
readonly serializer: JsonProtoSerializer
3333
) {
3434
this.cursor = 0;
35-
this.elements = new Array<SizedBundleElement>();
35+
this.elements = [];
3636

3737
let element = this.nextElement();
38-
console.error('DEEDB Element (metadata): ', element);
3938
if (element && element.isBundleMetadata()) {
4039
this.metadata = element as BundleMetadata;
4140
} else {
@@ -46,11 +45,8 @@ export class BundleReaderSyncImpl implements BundleReaderSync {
4645
do {
4746
element = this.nextElement();
4847
if (element !== null) {
49-
console.error('DEDB parsed element: ', element);
5048
this.elements.push(element);
51-
} else {
52-
console.error('DEDB no more elements.');
53-
}
49+
}
5450
} while (element !== null);
5551
}
5652

@@ -60,7 +56,7 @@ export class BundleReaderSyncImpl implements BundleReaderSync {
6056
}
6157

6258
/* Returns the DocumentSnapshot or NamedQuery elements of the bundle. */
63-
getElements(): Array<SizedBundleElement> {
59+
getElements(): SizedBundleElement[] {
6460
return this.elements;
6561
}
6662

0 commit comments

Comments
 (0)