ws-cleanup-types: Types, api, host: honest annotations; return the full annotated value count

This commit is contained in:
4DBug committed 2026-10-31 10:43:19 -05:00
1 parent 59a0352ca6
commit f209801579
22 files changed
+147 -147

No files matched your search

+3 -3
View File
@@ -59,7 +59,7 @@ function Methods.read(self: any, name: string): (buffer?, Err.Err?)
return nil, Err.new(Err.ARG, "no entry named " .. tostring(name))
end
if e.data then
return e.data
return e.data, nil
end
if e.load then
local ok, b, err = pcall(e.load)
@@ -69,9 +69,9 @@ function Methods.read(self: any, name: string): (buffer?, Err.Err?)
if not b then
return nil, err or Err.new(Err.CORRUPT, "entry " .. name .. ": decode failed")
end
return b
return b, nil
end
return buffer.create(0)
return buffer.create(0), nil
end
-- add(name, data, opts?) -> (): opts.mtime (unix seconds), opts.dir, opts.mode; replaces an entry of the same name