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

      • If the input node array is undefined, the output is undefined.
      • If the visitor can return undefined, the node it visits in the array will be reused.
      • If the output node array is not undefined, then its contents will satisfy the test.
      • In order to obtain a return type that is more specific than NodeArray<Node>, a test function must be provided, and that function must be a type predicate.

      Type Parameters

      Parameters

      • nodes: TInArray

        The NodeArray to visit.

      • visitor: Visitor<TIn, tsc.Node | undefined>

        The callback used to visit a Node.

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

        A node test to execute for each node.

      • Optionalstart: number

        An optional value indicating the starting offset at which to start visiting.

      • Optionalcount: number

        An optional value indicating the maximum number of nodes to visit.

      Returns NodeArray<TOut> | TInArray & undefined

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

      • If the input node array is undefined, the output is undefined.
      • If the visitor can return undefined, the node it visits in the array will be reused.
      • If the output node array is not undefined, then its contents will satisfy the test.
      • In order to obtain a return type that is more specific than NodeArray<Node>, a test function must be provided, and that function must be a type predicate.

      Type Parameters

      Parameters

      • nodes: TInArray

        The NodeArray to visit.

      • visitor: Visitor<TIn, tsc.Node | undefined>

        The callback used to visit a Node.

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

        A node test to execute for each node.

      • Optionalstart: number

        An optional value indicating the starting offset at which to start visiting.

      • Optionalcount: number

        An optional value indicating the maximum number of nodes to visit.

      Returns NodeArray<tsc.Node> | TInArray & undefined