Skip to content

[Code Quality] Extensive any usage bypasses TypeScript strict mode throughout codebase #10

@coderabbitai

Description

@coderabbitai

Summary

Despite tsconfig.json enabling strict: true, any is used pervasively across core modules, negating most type-safety benefits.

Key Occurrences

File Usage
src/config/manager.ts validateConfig(config: any), configToSave as any
src/agents/base.ts protected config: any
src/agents/types.ts AgentConfig is { [key: string]: any }
src/beads/memory.ts private db: any
src/git/collector.ts private git: any, multiple casts
src/pocketflow/workflow.ts private config: any
src/llm/adapter.ts LLMConfig has [key: string]: any index signature

Impact

  • Runtime type errors are not caught at compile time
  • IDE auto-complete and refactoring tools cannot reason about these values

Recommended Fix

  • Type db as Database from better-sqlite3
  • Type git as SimpleGit from simple-git
  • Replace AgentConfig placeholder with concrete per-agent config interfaces
  • Remove the [key: string]: any index signature from LLMConfig

Backlink: #1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions