local ____lualib = require("lualib_bundle")
local __TS__New = ____lualib.__TS__New
local ____exports = {}
--- Helper function to instantiate an array of mod features all at once. Use this function if your
-- mod uses the pattern of expressing mod features as `ModFeature` classes.
-- 
-- If your feature classes have `v` variables, then this function will successfully register them
-- with the save data manager.
-- 
-- For example:
-- 
-- ```ts
-- const MOD_FEATURES = [
--   MyFeature1,
--   MyFeature2,
--   MyFeature3,
-- ] as const;
-- initModFeatures(mod, MOD_FEATURES);
-- ```
-- 
-- @returns An array of the instantiated features in the same order that the constructors were
-- passed in. (In most cases, you probably won't need the returned array.)
function ____exports.initModFeatures(self, mod, modFeatures)
    local instantiatedModFeatures = {}
    for ____, modFeature in ipairs(modFeatures) do
        local instantiatedModFeature = __TS__New(modFeature, mod, false)
        instantiatedModFeature:init()
        instantiatedModFeatures[#instantiatedModFeatures + 1] = instantiatedModFeature
    end
    return instantiatedModFeatures
end
return ____exports
