Amplication AST Libraries Documentation
    Preparing search index...

    Represents a Python import statement. This class handles the generation of Python import statements, including simple imports, from imports, and imports with aliases.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    moduleName: string

    The module name to import

    names: string[]

    The names to import from the module

    alias?: string

    The alias for the module or imported name

    Methods

    • Writes the import statement to the writer.

      Parameters

      • writer: Writer

        The writer to write to

      Returns void

    • 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