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 (10 loc) 683 B
import { ClassDeclaration } from 'ts-morph'; /** * Checks if a constructor parameter with the given name exists in a class. * * @param {ClassDeclaration} classDeclaration - The class declaration to check. * @param {string} parameterName - The name of the constructor parameter. * @param {boolean} isAlsoClassMember - Optional. Determines if only constructor parameter that are also class members are checked. Default is false. * @returns {boolean} - True if a constructor parameter with the given name exists, false otherwise. */ export declare function HasConstructorParameter(classDeclaration: ClassDeclaration, parameterName: string, isAlsoClassMember?: boolean): boolean;