UNPKG

670 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Unique = void 0;
4const attribute_service_1 = require("../attribute-service");
5function Unique(...args) {
6 if (args.length === 1) {
7 const [options] = args;
8 return (_target, _propertyName) => {
9 annotate(_target, _propertyName, options);
10 };
11 }
12 const [target, propertyName] = args;
13 annotate(target, propertyName);
14}
15exports.Unique = Unique;
16function annotate(target, propertyName, option = true) {
17 (0, attribute_service_1.addAttributeOptions)(target, propertyName, {
18 unique: option,
19 });
20}
21//# sourceMappingURL=unique.js.map
\No newline at end of file