@rxap/schematics-ts-morph
Version:
This package provides utilities for manipulating TypeScript code using ts-morph, particularly for Angular and NestJS projects. It offers functions to add, coerce, and modify code elements like classes, methods, decorators, and imports. The package also in
15 lines • 657 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetClassDecoratorArguments = GetClassDecoratorArguments;
function GetClassDecoratorArguments(classDeclaration, nameOrFindFunction) {
var _a;
let decorator;
if (typeof nameOrFindFunction === 'string') {
decorator = classDeclaration.getDecorator(nameOrFindFunction);
}
else {
decorator = classDeclaration.getDecorator(nameOrFindFunction);
}
return (_a = decorator === null || decorator === void 0 ? void 0 : decorator.getArguments()) !== null && _a !== void 0 ? _a : [];
}
//# sourceMappingURL=get-class-decorator-arguments.js.map