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:
1 parent
dc98aec2ec
commit
f459b2dcdf
44 files changed
+172
-119
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user