Files
NapCatQQ/.pnpm-store/v3/files/85/deddeb2d2225fa0d83949505937b2fa5e5a9cd1d30d8c9191d70ae8fa58babdb53059873d6f8e0b229bfb15091babfba39427ef59792743605958605abe39c
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
884 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.injectFromHierarchy = injectFromHierarchy;
const prototype_utils_1 = require("@inversifyjs/prototype-utils");
const injectFrom_1 = require("./injectFrom");
function injectFromHierarchy(options) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
return (target) => {
const chain = [];
let current = (0, prototype_utils_1.getBaseType)(target);
while (current !== undefined && current !== Object) {
const ancestor = current;
chain.push(ancestor);
current = (0, prototype_utils_1.getBaseType)(ancestor);
}
chain.reverse();
for (const type of chain) {
(0, injectFrom_1.injectFrom)({ ...options, type })(target);
}
};
}
//# sourceMappingURL=injectFromHierarchy.js.map