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

20 lines
1.0 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExtendedLifecycle = getExtendedLifecycle;
function getLifecycleSetUnion(extend, baseSet, currentSet) {
if (extend) {
return new Set([...baseSet, ...currentSet]);
}
return currentSet;
}
function getExtendedLifecycle(options, baseTypeClassMetadata, typeMetadata) {
const extendPostConstructMethods = options.lifecycle?.extendPostConstructMethods ?? true;
const extendPreDestroyMethods = options.lifecycle?.extendPreDestroyMethods ?? true;
const preDestroyMethodNames = getLifecycleSetUnion(extendPreDestroyMethods, baseTypeClassMetadata.lifecycle.preDestroyMethodNames, typeMetadata.lifecycle.preDestroyMethodNames);
const postConstructMethodNames = getLifecycleSetUnion(extendPostConstructMethods, baseTypeClassMetadata.lifecycle.postConstructMethodNames, typeMetadata.lifecycle.postConstructMethodNames);
return {
postConstructMethodNames,
preDestroyMethodNames,
};
}
//# sourceMappingURL=getExtendedLifecycle.js.map