• Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.

    Parameters

    • ast: Node

      the abstract syntax tree from which to generate output code.

    • Optionalopts: GeneratorOptions

      used for specifying options for code generation.

    • Optionalcode: string | {
          [filename: string]: string;
      }

      the original source code, used for source maps.

    Returns GeneratorResult

    • an object containing the output code and source map.