@libraz/libcantus - v1.1.0
    Preparing search index...

    Function assertKeyVariant

    • Refuse a scale form the key's own mask does not hold.

      A key whose variant says 'harmonic' over a major mask prints as a harmonic minor while comparing equal to plain C major, so a project file that carried the two apart is refused where the mismatch is still an argument. Kept beside the type it validates: the pairing of form and mask is written once, and every construction path reads that one.

      Parameters

      • variant: KeyVariant

        The form claimed for the key.

      • modeMask12: number

        The mask the key actually holds.

      Returns void

      If the form is not one a key may stand in, or the mask does not hold it.