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

15 lines 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CoerceClassMethod = CoerceClassMethod; /** * @deprecated import from @rxap/ts-morph */ function CoerceClassMethod(classDeclaration, name, structure = {}) { let methodDeclaration = classDeclaration.getMethod(name); if (!methodDeclaration) { methodDeclaration = classDeclaration.addMethod({ name }); methodDeclaration.set(structure); } return methodDeclaration; } //# sourceMappingURL=coerce-class-method.js.map