local ____exports = {}
local ____tstlClass = require("functions.tstlClass")
local getTSTLClassName = ____tstlClass.getTSTLClassName
____exports.EXPORTED_METHOD_NAMES_KEY = "__exportedMethodNames"
--- A decorator function that signifies that the decorated class method should be added to the
-- `ModUpgraded` object.
-- 
-- This is only meant to be used internally.
function ____exports.Exported(self, target, propertyKey)
    local constructor = target.constructor
    if constructor == nil then
        local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
        error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods.")
    end
    local exportedMethodNames = constructor[____exports.EXPORTED_METHOD_NAMES_KEY]
    if exportedMethodNames == nil then
        exportedMethodNames = {}
        constructor[____exports.EXPORTED_METHOD_NAMES_KEY] = exportedMethodNames
    end
    exportedMethodNames[#exportedMethodNames + 1] = propertyKey
end
return ____exports
