Amplication AST Libraries Documentation
    Preparing search index...

    Represents a C# type in the AST. This class handles the generation of C# type declarations, including primitive types, collection types, nullable types, and custom class references.

    Hierarchy (View Summary)

    Index

    Properties

    internalType: InternalType

    The internal representation of the type

    Methods

    • Writes the type declaration to the writer.

      Parameters

      • writer: Writer

        The writer to write to

      Returns void

    • Creates a C# string type.

      Returns Type

      A new string type

    • Creates a C# boolean type.

      Returns Type

      A new boolean type

    • Creates a C# integer type.

      Returns Type

      A new integer type

    • Creates a C# long type.

      Returns Type

      A new long type

    • Creates a C# double type.

      Returns Type

      A new double type

    • Creates a C# DateOnly type.

      Returns Type

      A new date type

    • Creates a C# DateTime type.

      Returns Type

      A new datetime type

    • Creates a C# Guid type.

      Returns Type

      A new UUID type

    • Creates a C# object type.

      Returns Type

      A new object type

    • Creates a C# List type.

      Parameters

      • value: Type

        The type parameter for the list

      Returns Type

      A new list type

    • Creates a C# HashSet type.

      Parameters

      • value: Type

        The type parameter for the set

      Returns Type

      A new set type

    • Creates a C# Dictionary<K,V> type.

      Parameters

      • keyType: Type

        The type of the dictionary keys

      • valueType: Type

        The type of the dictionary values

      Returns Type

      A new dictionary type

    • Creates a C# nullable type (T?).

      Parameters

      • value: Type

        The type that can be null

      Returns Type

      A new nullable type

    • Creates a C# union type (one of several possible types).

      Parameters

      • memberValues: Type[]

        The possible types in the union

      Returns Type

      A new union type

    • Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.

      Returns string

      The string representation of the AST node