UNPKG

579 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.applyFieldDecorators = void 0;
4const decorators_1 = require("../decorators");
5function applyFieldDecorators(targetClass, item) {
6 if (item.extensions) {
7 (0, decorators_1.Extensions)(item.extensions)(targetClass.prototype, item.name);
8 }
9 if (item.directives?.length) {
10 item.directives.map((directive) => {
11 (0, decorators_1.Directive)(directive.sdl)(targetClass.prototype, item.name);
12 });
13 }
14}
15exports.applyFieldDecorators = applyFieldDecorators;