Function makeByXFunction

  • Makes a byX function, like byStat or byClass

    Type Parameters

    • T extends string

    Parameters

    • source: Delayed<T, never[]>

      A method for finding your stat, or class, or whatever X is in this context

    Returns (<S>(options: Switch<T, S>, alternateSource?: Delayed<T>) => S)

    A function akin to byStat or byClass; it accepts an object that either is "complete" in the sense that it has a key for every conceivable value, or contains a default parameter. If an inappropriate input is provided, returns undefined.

      • <S>(options, alternateSource?): S
      • Type Parameters

        • S

        Parameters

        Returns S