diff --git a/keypadOS.lua b/keypadOS.lua index 2307c5c..2e31f55 100644 --- a/keypadOS.lua +++ b/keypadOS.lua @@ -183,6 +183,13 @@ __BUNDLER_FILES["ui.lua"] = function () end -- FILE END: ui.lua -- __BUNDLER_FILES["utils.lua"] = function () + -- Type coersion for lsp + ---@generic T + ---@param object any + ---@return T + function Cast(object) + return object + end --- @type Monitor local MONITOR = Cast(peripheral.find("monitor")) local MONITOR_Y = 1 @@ -195,13 +202,6 @@ __BUNDLER_FILES["utils.lua"] = function () MONITOR.clear() MONITOR.setTextScale(scale) end - -- Type coersion for lsp - ---@generic T - ---@param object any - ---@return T - function Cast(object) - return object - end return { MonPrint, MonReset, diff --git a/src/utils.lua b/src/utils.lua index 6f26832..41479fb 100644 --- a/src/utils.lua +++ b/src/utils.lua @@ -1,3 +1,12 @@ +-- Type coersion for lsp +---@generic T +---@param object any +---@return T +function Cast(object) + return object +end + + --- @type Monitor local MONITOR = Cast(peripheral.find("monitor")) local MONITOR_Y = 1 @@ -12,14 +21,6 @@ function MonReset(scale) MONITOR.setTextScale(scale) end --- Type coersion for lsp ----@generic T ----@param object any ----@return T -function Cast(object) - return object -end - return { MonPrint, MonReset,