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

16 lines 565 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CoerceClassConstructor = CoerceClassConstructor; /** * @deprecated import from @rxap/sts-morph */ function CoerceClassConstructor(classDeclaration) { const constructorDeclarations = classDeclaration.getConstructors(); if (constructorDeclarations.length === 0) { constructorDeclarations.push(classDeclaration.addConstructor({ parameters: [], })); } return constructorDeclarations; } //# sourceMappingURL=coerce-class-constructor.js.map