@servicenow/sdk - v4.7.0
    Preparing search index...
    • Visits a Node using the supplied visitor, possibly returning a new Node in its place.

      • If the input node is undefined, then the output is undefined.
      • If the visitor returns undefined, then the output is undefined.
      • If the output node is not undefined, then it will satisfy the test function.
      • In order to obtain a return type that is more specific than Node, a test function must be provided, and that function must be a type predicate.

      Type Parameters

      Parameters

      • node: TIn

        The Node to visit.

      • visitor: Visitor<NonNullable<TIn>, TVisited>

        The callback used to visit the Node.

      • test: (node: tsc.Node) => node is TOut

        A callback to execute to verify the Node is valid.

      • Optionallift: (node: readonly tsc.Node[]) => tsc.Node

        An optional callback to execute to lift a NodeArray into a valid Node.

      Returns TOut | TIn & undefined | TVisited & undefined

    • Visits a Node using the supplied visitor, possibly returning a new Node in its place.

      • If the input node is undefined, then the output is undefined.
      • If the visitor returns undefined, then the output is undefined.
      • If the output node is not undefined, then it will satisfy the test function.
      • In order to obtain a return type that is more specific than Node, a test function must be provided, and that function must be a type predicate.

      Type Parameters

      Parameters

      • node: TIn

        The Node to visit.

      • visitor: Visitor<NonNullable<TIn>, TVisited>

        The callback used to visit the Node.

      • Optionaltest: (node: tsc.Node) => boolean

        A callback to execute to verify the Node is valid.

      • Optionallift: (node: readonly tsc.Node[]) => tsc.Node

        An optional callback to execute to lift a NodeArray into a valid Node.

      Returns tsc.Node | TIn & undefined | TVisited & undefined