diff --git a/dev/src/bulk-writer.ts b/dev/src/bulk-writer.ts index 4635220dd..053d10179 100644 --- a/dev/src/bulk-writer.ts +++ b/dev/src/bulk-writer.ts @@ -336,6 +336,7 @@ export class BulkWriterError extends Error { readonly message: string, /** The document reference the operation was performed on. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any readonly documentRef: firestore.DocumentReference, /** The type of operation performed. */ @@ -782,6 +783,7 @@ export class BulkWriter { */ onWriteResult( successCallback: ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any documentRef: firestore.DocumentReference, result: WriteResult ) => void diff --git a/dev/src/index.ts b/dev/src/index.ts index 6448e475b..b8d0c3a00 100644 --- a/dev/src/index.ts +++ b/dev/src/index.ts @@ -1401,8 +1401,9 @@ export class Firestore implements firestore.Firestore { * ``` */ recursiveDelete( - ref: - | firestore.CollectionReference + ref: // eslint-disable-next-line @typescript-eslint/no-explicit-any + | firestore.CollectionReference + // eslint-disable-next-line @typescript-eslint/no-explicit-any | firestore.DocumentReference, bulkWriter?: BulkWriter ): Promise { diff --git a/dev/src/reference.ts b/dev/src/reference.ts index 93b22ef57..89f6eace4 100644 --- a/dev/src/reference.ts +++ b/dev/src/reference.ts @@ -2095,9 +2095,7 @@ export class Query< * ``` */ startAt( - ...fieldValuesOrDocumentSnapshot: Array< - firestore.DocumentSnapshot | unknown - > + ...fieldValuesOrDocumentSnapshot: Array ): Query { validateMinNumberOfArguments( 'Query.startAt', @@ -2141,9 +2139,7 @@ export class Query< * ``` */ startAfter( - ...fieldValuesOrDocumentSnapshot: Array< - firestore.DocumentSnapshot | unknown - > + ...fieldValuesOrDocumentSnapshot: Array ): Query { validateMinNumberOfArguments( 'Query.startAfter', @@ -2186,9 +2182,7 @@ export class Query< * ``` */ endBefore( - ...fieldValuesOrDocumentSnapshot: Array< - firestore.DocumentSnapshot | unknown - > + ...fieldValuesOrDocumentSnapshot: Array ): Query { validateMinNumberOfArguments( 'Query.endBefore', @@ -2231,9 +2225,7 @@ export class Query< * ``` */ endAt( - ...fieldValuesOrDocumentSnapshot: Array< - firestore.DocumentSnapshot | unknown - > + ...fieldValuesOrDocumentSnapshot: Array ): Query { validateMinNumberOfArguments( 'Query.endAt', diff --git a/dev/src/transaction.ts b/dev/src/transaction.ts index ca250a779..a5690d3cc 100644 --- a/dev/src/transaction.ts +++ b/dev/src/transaction.ts @@ -410,6 +410,7 @@ export class Transaction implements firestore.Transaction { * ``` */ delete( + // eslint-disable-next-line @typescript-eslint/no-explicit-any documentRef: DocumentReference, precondition?: firestore.Precondition ): this { diff --git a/dev/src/watch.ts b/dev/src/watch.ts index 58db216a0..13f4ec114 100644 --- a/dev/src/watch.ts +++ b/dev/src/watch.ts @@ -54,6 +54,7 @@ export const WATCH_IDLE_TIMEOUT_MS = 120 * 1000; /*! * Sentinel value for a document remove. */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any const REMOVED = {} as DocumentSnapshotBuilder; /*! diff --git a/dev/src/write-batch.ts b/dev/src/write-batch.ts index 87804de0d..33536a275 100644 --- a/dev/src/write-batch.ts +++ b/dev/src/write-batch.ts @@ -254,6 +254,7 @@ export class WriteBatch implements firestore.WriteBatch { * ``` */ delete( + // eslint-disable-next-line @typescript-eslint/no-explicit-any documentRef: firestore.DocumentReference, precondition?: firestore.Precondition ): WriteBatch { diff --git a/dev/test/types.ts b/dev/test/types.ts index 1d99616b4..0d150c6c8 100644 --- a/dev/test/types.ts +++ b/dev/test/types.ts @@ -39,6 +39,8 @@ describe('FirestoreTypeConverter', () => { }; }, }; + // The intent of the function below is to test TypeScript compile and not execute. + // eslint-disable-next-line @typescript-eslint/no-unused-vars async function _(docRef: DocumentReference): Promise { const newDocRef = docRef.withConverter(converter); await newDocRef.set({stringProperty: 'foo', numberProperty: 42}); @@ -66,6 +68,8 @@ describe('FirestoreTypeConverter', () => { }; }, }; + // The intent of the function below is to test TypeScript compile and not execute. + // eslint-disable-next-line @typescript-eslint/no-unused-vars async function _(docRef: DocumentReference): Promise { const newDocRef = docRef.withConverter(converter); await newDocRef.set({stringProperty: 'foo', numberProperty: 42}); @@ -109,6 +113,8 @@ describe('FirestoreTypeConverter', () => { }; }, }; + // The intent of the function below is to test TypeScript compile and not execute. + // eslint-disable-next-line @typescript-eslint/no-unused-vars async function _(docRef: DocumentReference): Promise { const newDocRef = docRef.withConverter(converter); await newDocRef.set({stringProperty: 'foo', numberProperty: 42}); @@ -136,6 +142,8 @@ describe('FirestoreTypeConverter', () => { }; }, }; + // The intent of the function below is to test TypeScript compile and not execute. + // eslint-disable-next-line @typescript-eslint/no-unused-vars async function _(docRef: DocumentReference): Promise { const newDocRef = docRef.withConverter(converter); await newDocRef.set({stringProperty: 'foo', numberProperty: 42}); @@ -167,6 +175,8 @@ describe('FirestoreTypeConverter', () => { }; }, }; + // The intent of the function below is to test TypeScript compile and not execute. + // eslint-disable-next-line @typescript-eslint/no-unused-vars async function _(docRef: DocumentReference): Promise { const newDocRef = docRef.withConverter(converter); await newDocRef.set({stringProperty: 'foo', numberProperty: 42});