Type Alias Annotate<A>

Annotate<A>: ((node: object, path: Path, kind: Kind) => A)

Computes additional properties to be recursively incorporated into the output node.

Type Parameters

  • A

    The type of the annotation.

Type declaration

    • (node, path, kind): A
    • Parameters

      • node: object

        The input node -- eg: {type: "Identifier", name: "foo"}.

      • path: Path

        The path to the input node -- eg: "$.body.body.0.expression.property".

      • kind: Kind

        The kind of the input node -- eg: "PublicKey".

      Returns A

      The annotation whose properties will be added to the output node -- eg: { loc: { start: { line: 12, column: 34 } } }.