Skip to content

Commit 2bdb2a2

Browse files
committed
fix(annotation): allow all types for encode/decode in string.buffer
1 parent 996e21a commit 2bdb2a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

meta/template/string.buffer.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function buf:ref() end
262262
--- Serializes (encodes) the Lua object to the buffer
263263
---
264264
--- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables.
265-
---@param obj string.buffer.data
265+
---@param obj any
266266
---@return string.buffer
267267
function buf:encode(obj) end
268268

@@ -277,14 +277,14 @@ function buf:encode(obj) end
277277
---
278278
--- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet.
279279
---
280-
---@return string.buffer.data|nil obj
280+
---@return any obj
281281
function buf:decode() end
282282

283283

284284
--- Serializes (encodes) the Lua object obj
285285
---
286286
--- This function may throw an error when attempting to serialize unsupported object types, circular references or deeply nested tables.
287-
---@param obj string.buffer.data
287+
---@param obj any
288288
---@return string
289289
function buffer.encode(obj) end
290290

@@ -298,7 +298,7 @@ function buffer.encode(obj) end
298298
--- Attempting to de-serialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet.
299299
---
300300
---@param str string
301-
---@return string.buffer.data|nil obj
301+
---@return any obj
302302
function buffer.decode(str) end
303303

304304

0 commit comments

Comments
 (0)