"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Exported = exports.EXPORTED_METHOD_NAMES_KEY = void 0;
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 Exported(target, propertyKey) {
    // Since the decorator runs prior to instantiation, we only have access to get and set static
    // properties, which are located on the "constructor" table.
    const constructor = target.constructor;
    if (!constructor.has(exports.EXPORTED_METHOD_NAMES_KEY)) {
        constructor.set(exports.EXPORTED_METHOD_NAMES_KEY, []);
    }
    const exportedMethodNames = constructor.get(exports.EXPORTED_METHOD_NAMES_KEY);
    exportedMethodNames.push(propertyKey);
}
exports.Exported = Exported;
