Function visitRequirements

  • Visits an option's requirements, executing a callback according to the type of the requirement.

    Type Parameters

    • T

    Parameters

    • requires: Requires

      The option requirements

    • keyFn: ((req) => T)

      The callback to process an option key

        • (req): T
        • Parameters

          • req: string

          Returns T

    • notFn: ((req) => T)

      The callback to process a "not" expression

    • allFn: ((req) => T)

      The callback to process an "all" expression

    • oneFn: ((req) => T)

      The callback to process a "one" expression

    • valFn: ((req) => T)

      The callback to process a requirement object

    • cbkFn: ((req) => T)

      The callback to process a requirement callback

    Returns T

    The result of the callback