• Function to encode the AST or a part of it with a custom encoder.

    Type Parameters

    • T

    Parameters

    • encoder: Encoder<T>

      function which allows the conversion of the AST into another type.

    • walkerOrAst: Walker | AST

      a Walker or AST instance. If not provided the parsed AST is used.

    Returns any

    output of the encoder.

Generated using TypeDoc