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: string) => T

      The callback to process an option key

    • notFn: (req: RequiresNot) => T

      The callback to process a "not" expression

    • allFn: (req: RequiresAll) => T

      The callback to process an "all" expression

    • oneFn: (req: RequiresOne) => T

      The callback to process a "one" expression

    • valFn: (req: RequiresVal) => T

      The callback to process a requirement object

    • cbkFn: (req: RequirementCallback) => T

      The callback to process a requirement callback

    Returns T

    The result of the callback