-
Notifications
You must be signed in to change notification settings - Fork 2
dx: replace 'any' types in cost-extractor.ts with proper interfaces #68
Copy link
Copy link
Open
Labels
dxDeveloper experience improvementsDeveloper experience improvementsgood first issueGood for newcomersGood for newcomers
Description
The cost extractor utility (src/utils/cost-extractor.ts) uses any types in two places: extractCostFromResult(msg: any) and when iterating over msg.modelUsage as Record<string, any>. Since the function processes Claude SDK response messages, the input shape is known and can be typed with a proper interface. Replacing the any types improves type safety and IDE autocompletion.
Relevant files:
src/utils/cost-extractor.ts— define an interface for the expected message shape and replaceanyusages
Acceptance criteria:
- No
anytypes remain in the file - A new interface (e.g.,
ClaudeResultMessage) defines the expected input shape with optional fields npm run lintpasses (tsc --noEmit with strict mode)- No runtime behavior change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dxDeveloper experience improvementsDeveloper experience improvementsgood first issueGood for newcomersGood for newcomers