Skip to content

Commit b51e0a0

Browse files
committed
exhaustiveness check
1 parent 442f41e commit b51e0a0

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/commands/statusline.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ export const statuslineCommand = define({
231231
const costSource = ctx.values.costSource;
232232

233233
// If 'cc' mode and cost is available from Claude Code, use it
234-
if (costSource === 'cc' && hookData.cost?.total_cost_usd != null) {
235-
return hookData.cost.total_cost_usd;
234+
if (costSource === 'cc') {
235+
return hookData.cost?.total_cost_usd;
236236
}
237237

238238
// If 'ccusage' mode, always calculate using ccusage
@@ -270,9 +270,7 @@ export const statuslineCommand = define({
270270
Result.unwrap(undefined),
271271
);
272272
}
273-
274-
// If 'cc' mode but no cost available, return undefined (will show N/A)
275-
return undefined;
273+
costSource satisfies never; // Exhaustiveness check
276274
})();
277275

278276
// Load today's usage data

0 commit comments

Comments
 (0)