Skip to content

Commit 8ad979e

Browse files
Copilothotlong
andcommitted
Fix TypeScript type annotations in QueryAnalyzer
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 294d146 commit 8ad979e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/foundation/core/src/query/query-analyzer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ export class QueryAnalyzer {
368368
// Suggest adding indexes
369369
if (query.filters && query.filters.length > 0 && indexes.length === 0) {
370370
const filterFields = query.filters
371-
.filter(f => Array.isArray(f) && f.length >= 1)
372-
.map(f => String(f[0]));
371+
.filter((f: any) => Array.isArray(f) && f.length >= 1)
372+
.map((f: any) => String(f[0]));
373373

374374
if (filterFields.length > 0) {
375375
suggestions.push(`Consider adding an index on: ${filterFields.join(', ')}`);
@@ -384,8 +384,8 @@ export class QueryAnalyzer {
384384
// Suggest composite index for multiple filters
385385
if (query.filters && query.filters.length > 1 && indexes.length < 2) {
386386
const filterFields = query.filters
387-
.filter(f => Array.isArray(f) && f.length >= 1)
388-
.map(f => String(f[0]))
387+
.filter((f: any) => Array.isArray(f) && f.length >= 1)
388+
.map((f: any) => String(f[0]))
389389
.slice(0, 3); // Top 3 fields
390390

391391
if (filterFields.length > 1) {
@@ -411,7 +411,7 @@ export class QueryAnalyzer {
411411
complexity += query.filters.length * 5;
412412

413413
// Nested filters (OR conditions) add more
414-
const hasNestedFilters = query.filters.some(f =>
414+
const hasNestedFilters = query.filters.some((f: any) =>
415415
Array.isArray(f) && Array.isArray(f[0])
416416
);
417417
if (hasNestedFilters) {

0 commit comments

Comments
 (0)