Function byClass

Picks an option based on your player class

  • Type Parameters

    • S

    Parameters

    • options: Switch<ClassType, S>

      An object keyed by player class; it must either contain all classes, or have a default parameter.

    • OptionalalternateSource: ClassType | ((...args: never[]) => ClassType)

      An optional anternate way of determining which Class to choose by.

    Returns S

    The option corresponding to your player class.