@essential-projects/metadata
Version:
the core metadata service for using the metadata from inside the domain
26 lines (24 loc) • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const metadata_contracts_1 = require("@essential-projects/metadata_contracts");
const provider_1 = require("./../provider");
function schemaAttribute(schema, namespace) {
return function schemaAttributeFactory(...args) {
switch (args.length) {
case 3:
if (typeof args[2] === 'number') {
}
return methodSchemaAttribute.apply(this, [args[0], args[1], args[2], schema, namespace]);
default:
throw new Error('Decorators are not valid here!');
}
};
}
exports.schemaAttribute = schemaAttribute;
function methodSchemaAttribute(target, key, descriptor, schema, namespace) {
const type = target.constructor.name;
provider_1.MetadataProvider.setForType(metadata_contracts_1.MetadataType.SchemaAttribute, schema, namespace, type, key);
return descriptor;
}
exports.methodSchemaAttribute = methodSchemaAttribute;
//# sourceMappingURL=schema_attribute.js.map