--# selene: allow(unused_variable)
---@diagnostic disable: unused-local

-- Various features/facilities for developers who are working on Hammerspoon itself, or writing extensions for it. It is extremely unlikely that you should need any part of this extension, in a normal user configuration.
---@class hs.crash
local M = {}
hs.crash = M

-- Attempts to reduce RAM usage of Hammerspoon
--
-- Parameters:
--  * None
--
-- Returns:
--  * None
--
-- Notes:
--  * This function will print some memory usage numbers (in bytes) to the Hammerspoon Console before and after forcing Lua's garbage collector
function M.attemptMemoryRelease() end

-- Causes Hammerspoon to immediately crash
--
-- Parameters:
--  * None
--
-- Returns:
--  * None
--
-- Notes:
--  * This is for testing purposes only, you are extremely unlikely to need this in normal Hammerspoon usage
function M.crash() end

-- Sets a key/value pair in any Sentry crash dump generated by this Hammerspoon session
--
-- Parameters:
--  * key - A string containing the key name of the pair
--  * value - A string containing the value of the pair
--
-- Returns:
--  * None
function M.crashKV(key, value, ...) end

-- Leaves a breadcrumb log message in any Sentry crash dump generated by this Hammerspoon session
--
-- Parameters:
--  * logMessage - A string containing a message to log
--
-- Returns:
--  * None
--
-- Notes:
--  * This is probably only useful to extension developers. If you are trying to track down a confusing crash, and you have access to the Sentry project for Hammerspoon (or access to someone who has access!), this can be a useful way to leave breadcrumbs from Lua in the crash dump
function M.crashLog(logMessage, ...) end

-- Dumps the contents of Lua's CLIBS registry
--
-- Parameters:
--  * None
--
-- Returns:
--  * A table containing all the paths of C libraries that have been loaded into the Lua runtime
--
-- Notes:
--  * This is probably only useful to extension developers as a useful way of ensuring that you are loading C libraries from the places you expect.
function M.dumpCLIBS() end

-- Gets the resident size of the Hammerspoon process
--
-- Parameters:
--  * None
--
-- Returns:
--  * An integer containing the amount of RAM in use by Hammerspoon (in bytes), or nil if an error occurred
function M.residentSize() end

-- Causes Hammerspoon to generate an Objective C exception
--
-- Parameters:
--  * name - A string containing the name of the exception
--  * message - A human readable string explaining the exception
--
-- Returns:
--  * None
--
-- Notes:
--  * Outside of a context of a Lua pcall() (or a C lua_pcall()), this will cause Hammerspoon to exit. We follow the safe behaviour of terminating the app on any unhandled Objective C exception.
function M.throwObjCException(name, message, ...) end

