1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var __1 = require("../");
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | function Check(nameOrExpression, maybeExpression) {
|
10 | var name = maybeExpression ? nameOrExpression : undefined;
|
11 | var expression = maybeExpression ? maybeExpression : nameOrExpression;
|
12 | if (!expression)
|
13 | throw new Error("Check expression is required");
|
14 | return function (clsOrObject, propertyName) {
|
15 | __1.getMetadataArgsStorage().checks.push({
|
16 | target: propertyName ? clsOrObject.constructor : clsOrObject,
|
17 | name: name,
|
18 | expression: expression
|
19 | });
|
20 | };
|
21 | }
|
22 | exports.Check = Check;
|
23 |
|
24 |
|