Files
NapCatQQ/.pnpm-store/v3/files/07/70fd6a13d31b2514016b00d6543d57c776f5d33705e81d8dbdc76f2818d7e9334c0104bbcf62375fd8c07ded50d49b04a5c1aff15fd2d8d775403d273a18ed
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

29 lines
1.7 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateConstructorMetadataArray = validateConstructorMetadataArray;
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
function validateConstructorMetadataArray(type, value) {
const undefinedIndexes = [];
if (value.length < type.length) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.missingInjectionDecorator, `Found unexpected missing metadata on type "${type.name}". "${type.name}" constructor requires at least ${type.length.toString()} arguments, found ${value.length.toString()} instead.
Are you using @inject, @multiInject or @unmanaged decorators in every non optional constructor argument?
If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true`);
}
// Using a for loop to ensure empty values are traversed as well
for (let i = 0; i < value.length; ++i) {
const element = value[i];
if (element === undefined) {
undefinedIndexes.push(i);
}
}
if (undefinedIndexes.length > 0) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.missingInjectionDecorator, `Found unexpected missing metadata on type "${type.name}" at constructor indexes "${undefinedIndexes.join('", "')}".
Are you using @inject, @multiInject or @unmanaged decorators at those indexes?
If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true`);
}
}
//# sourceMappingURL=validateConstructorMetadataArray.js.map