/**
 * Symbol used for storing descendants getter
 */
const descendantsGetterSymbol = Symbol('descendantsGetter');
/**
 * Defines function for dynamic component which is used for obtaining its descendants
 * @param descendantsGetterFn - Function used for obtaining descendants of dynamic component
 */
export function DescendantsGetter(descendantsGetterFn) {
    return function (target) {
        Object.defineProperty(target, descendantsGetterSymbol, {
            writable: false,
            configurable: false,
            enumerable: false,
            value: descendantsGetterFn,
        });
        return target;
    };
}
/**
 * Gets descendants getter if is set
 * @param type - Type which could contains descendants getter
 */
export function getDescendantsGetter(type) {
    if (descendantsGetterSymbol in type) {
        return type[descendantsGetterSymbol];
    }
    return null;
}
//# sourceMappingURL=descendantsGetter.decorator.js.map