Nog CLI Developer Guide - v0.10.5
    Preparing search index...

    Helper class to manage class-validator decorators on class properties. It maps internal validation rules (IR) to specific TypeScript decorators.

    Index

    Constructors

    Methods

    • Applies a list of validators to a ts-morph property declaration.

      Parameters

      • prop: PropertyDeclaration

        The property declaration to modify.

      • validators: IrValidator[]

        The list of internal validation rules to apply.

      Returns void

    • Collects all unique decorator names required by the validators. Useful for generating the import statement at the top of the file.

      Parameters

      • validators: IrValidator[]

        The list of validators to analyze.

      Returns string[]

      An array of unique decorator names (e.g., ['IsString', 'IsOptional']).