File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ local function format_time(timestamp)
3232 if not timestamp or timestamp == 0 then
3333 return " Unknown"
3434 end
35- return os.date (" %Y-%m-%d %H:%M:%S" , timestamp )
35+ return os.date (" %Y-%m-%d %H:%M:%S" , timestamp ) --- @diagnostic disable-line : return-type-mismatch
3636end
3737
3838--- Format detailed usage statistics for verbose display
@@ -43,8 +43,8 @@ M.format = function(context)
4343 return nil
4444 end
4545
46- local blocks_data = context .data
47- local stats = context .stats
46+ local blocks_data = context .data or {}
47+ local stats = context .stats or {}
4848
4949 -- Get the most recent block for additional details
5050 local last_block = blocks_data .blocks [# blocks_data .blocks ]
Original file line number Diff line number Diff line change 6666--- @field time_ratio number time progress ratio as float (0.0-1.0 )
6767
6868--- @class CCUsage.FormatterContext
69- --- @field data CCUsage.Data -- Raw JSON data from ccusage command
70- --- @field stats CCUsage.Stats -- Pre-computed stats from data for convenience
69+ --- @field data CCUsage.Data ? -- Raw JSON data from ccusage command
70+ --- @field stats CCUsage.Stats ? -- Pre-computed stats from data for convenience
7171
7272-- lua/ccusage/utils.lua -------------------------------------------------------
7373
You can’t perform that action at this time.
0 commit comments