Skip to content

Commit 5416b40

Browse files
authored
Merge pull request #15 from rainshen49/main
Fix typescript error in sample app.
2 parents 564a676 + ae1676e commit 5416b40

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/app/services/task.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
orderBy,
4040
Timestamp,
4141
where,
42+
CollectionReference,
4243
} from '@angular/fire/firestore';
4344
import { GoogleGenerativeAIFetchError } from '@google/generative-ai';
4445
import { v4 as uuidv4 } from 'uuid';
@@ -197,12 +198,12 @@ export class TaskService {
197198
collection(this.firestore, 'todos'),
198199
where('priority', '!=', 'null')
199200
);
200-
return collectionCount(taskQuery, { idField: 'id' });
201+
return collectionCount(taskQuery);
201202
}
202203

203204
loadSubtasks(maintaskId: string): Observable<Task[]> {
204205
const subtaskQuery = query(
205-
collection(this.firestore, 'todos'),
206+
collection(this.firestore, 'todos') as CollectionReference<Task, Task>,
206207
where('parentId', '==', maintaskId),
207208
orderBy('order', 'asc')
208209
);

0 commit comments

Comments
 (0)