UNPKG

@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

11 lines 456 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetComponentClass = GetComponentClass; function GetComponentClass(sourceFile) { const classWithComponent = sourceFile.getClasses().find(cls => cls.getDecorator('Component')); if (!classWithComponent) { throw new Error('Could not find class with Component decorator!'); } return classWithComponent; } //# sourceMappingURL=get-component-class.js.map