ws-cleanup-types: archive, audio, data, font, image, layered, music, playlist, subtitle, vector, video: annotations, casts, one value per re-assignment where the solver loses the type

This commit is contained in:
4DBug committed 2026-10-31 11:00:25 -05:00
1 parent dc98aec2ec
commit f459b2dcdf
44 files changed
+172 -119

No files matched your search

+2 -2
View File
@@ -42,11 +42,11 @@ function Data.base64(text: string, compression: string?): ({ number }?, string?,
return nil, "compression " .. compression .. " is not supported", true
end
local n = buffer.len(bytes) // 4
local out = table.create(n)
local out: { number } = table.create(n) :: { number }
for i = 0, n - 1 do
out[i + 1] = buffer.readu32(bytes, i * 4)
end
return out, nil
return out, nil, nil
end
-- toBase64(gids, compression?, level?) -> text | nil, message
+1 -1
View File
@@ -144,7 +144,7 @@ function Tiled.encode(map: Types.TileMap, opts: EncodeOptions?): (buffer?, Err.E
if o.compression and o.compression ~= "zlib" and o.compression ~= "gzip" then
return nil, Err.new(Err.ARG, "compression must be zlib or gzip")
end
local wo = { encoding = o.encoding, compression = o.compression, level = o.level }
local wo: Tmx.WriteOptions = { encoding = o.encoding :: string?, compression = o.compression, level = o.level }
if fmt == "tmx" or fmt == "tsx" or fmt == "xml" then
local doc: any, err: string?
if tilesetOnly then