local ____lualib = require("lualib_bundle")
local __TS__TypeOf = ____lualib.__TS__TypeOf
local ____exports = {}
function ____exports.isNumber(self, variable)
    return type(variable) == "number"
end
--- Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asCardType(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
-- `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asCollectibleType(self, num)
    return num
end
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asFloat(self, num)
    return num
end
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asInt(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asLevelStage(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asNPCState(self, num)
    return num
end
--- Helper function to safely cast an enum to a `number`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asNumber(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asPillColor(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asPillEffect(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asPlayerType(self, num)
    return num
end
--- Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asRoomType(self, num)
    return num
end
--- Helper function to safely cast an enum to a `string`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asString(self, str)
    return str
end
--- Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
-- 
-- This is useful to satisfy the "complete/strict-enums" ESLint rule.
function ____exports.asTrinketType(self, num)
    return num
end
function ____exports.isBoolean(self, variable)
    return type(variable) == "boolean"
end
function ____exports.isFunction(self, variable)
    return type(variable) == "function"
end
function ____exports.isInteger(self, variable)
    if not ____exports.isNumber(nil, variable) then
        return false
    end
    return variable == math.floor(variable)
end
--- Helper function to detect if a variable is a boolean, number, or string.
function ____exports.isPrimitive(self, variable)
    local variableType = __TS__TypeOf(variable)
    return variableType == "boolean" or variableType == "number" or variableType == "string"
end
function ____exports.isString(self, variable)
    return type(variable) == "string"
end
function ____exports.isTable(self, variable)
    return type(variable) == "table"
end
function ____exports.isUserdata(self, variable)
    return type(variable) == "userdata"
end
--- Helper function to convert a string to an integer. Returns undefined if the string is not an
-- integer.
-- 
-- Under the hood, this uses the built-in `tonumber` and `math.floor` functions.
-- 
-- This is named `parseIntSafe` in order to match the helper function from `complete-common`.
function ____exports.parseIntSafe(self, ____string)
    if not ____exports.isString(nil, ____string) then
        return nil
    end
    local number = tonumber(____string)
    if number == nil then
        return nil
    end
    local flooredNumber = math.floor(number)
    return number == flooredNumber and flooredNumber or nil
end
return ____exports
