Function findChildren

  • Iterates through all children and collects them in a set if the given predicate matches.

    Type Parameters

    • T extends object = any

    Parameters

    • root: object

      Root object to get the matching children from.

    • predicate: ((node) => boolean)

      Function that will be run for every child of the root object.

        • (node): boolean
        • Parameters

          • node: object

          Returns boolean

    • Optional options: {
          deep?: boolean;
      }

      An optional object with the deep option (defaults to false) set to true to get the children deeply or false to get them shallowly.

      • Optional deep?: boolean

    Returns ReadonlySet<T>

    A readonly observable set with the matching children.