1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.AllowNull = void 0;
|
4 | const attribute_service_1 = require("../attribute-service");
|
5 | function AllowNull(...args) {
|
6 | if (args.length === 1) {
|
7 | const allowNull = args[0];
|
8 | return (target, propertyName) => (0, attribute_service_1.addAttributeOptions)(target, propertyName, { allowNull });
|
9 | }
|
10 | else {
|
11 | const target = args[0];
|
12 | const propertyName = args[1];
|
13 | (0, attribute_service_1.addAttributeOptions)(target, propertyName, {
|
14 | allowNull: true,
|
15 | });
|
16 | }
|
17 | }
|
18 | exports.AllowNull = AllowNull;
|
19 |
|
\ | No newline at end of file |