UNPKG

@rxap/ts-morph

Version:

Provides utilities for manipulating TypeScript code using the ts-morph library. It offers a fluent API to add, modify, and remove code elements such as classes, decorators, imports, and properties in both Angular and NestJS projects. This package simplifi

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