From b554d73eeabb96f23385b7b093d5609ff6105e99 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 31 Mar 2025 13:21:27 -0500 Subject: type definitions --- library/lullaby/io.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 library/lullaby/io.lua (limited to 'library/lullaby/io.lua') diff --git a/library/lullaby/io.lua b/library/lullaby/io.lua new file mode 100644 index 0000000..4fb7768 --- /dev/null +++ b/library/lullaby/io.lua @@ -0,0 +1,40 @@ +---@meta + +---@class io +local io = {} + +---print a string with a "pretty" log header +---@param value string value to print +---@return nil +function io.log(value) end + +---print a string with a "pretty" warning header +---@param value string value to print +---@return nil +function io.warn(value) end + +---print a string with a "pretty" error header +---@param value string value to print +---@return nil +function io.error(value) end + +---print a string with a "pretty" debug header +---@param value string value to print +---@return nil +function io.debug(value) end + +---prints any value, expanding tables +---@param value any value to print +---@return nil +function io.pprint(value) end + +---@deprecated +function io.readfile() end + +---@deprecated +function io.json_parse() end + +---@deprecated +function io.arg_handle() end + +return io -- cgit v1.2.3 From dc7e4527e88ed0c59e17c0ff04c01e1c92136e42 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 14 Apr 2025 14:03:08 -0500 Subject: config change, local support, overall fixes --- library/lullaby/io.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'library/lullaby/io.lua') diff --git a/library/lullaby/io.lua b/library/lullaby/io.lua index 4fb7768..6e7eb9d 100644 --- a/library/lullaby/io.lua +++ b/library/lullaby/io.lua @@ -1,6 +1,13 @@ ---@meta ---@class io +---@field filemallocchunk integer default chunk size for readfile +---@field print_type integer print the type next to the value +---@field max_depth integer max print depth before collapsing +---@field start_nl_at integer when to start new line while printing +---@field collapse_all integer whether or not to collapse everything +---@field collapse_to_memory integer when collapsing, print memory address +---@field print_meta integer print metatable local io = {} ---print a string with a "pretty" log header -- cgit v1.2.3