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

    Utility class for building TypeScript class properties. Designed to be injected via DI.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Creates a class property declaration.

      Parameters

      • name: string

        The name of the property.

      • typeNode: TypeNode

        The AST node representing the property's type.

      • options: PropertyBuilderOptions = {}

        Modifiers, decorators, and comments for the property.

      Returns PropertyDeclaration

      The generated PropertyDeclaration AST node.

      // Generates:
      // /** User's age */
      // @IsOptional() public readonly age?: number;