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

    Function assertVocabulary

    • Reject a dictionary entry whose declared fields are outside their domains.

      Applied to caller-supplied entries at the point they enter a generator: an entry with a difficulty of 40 would otherwise pass every ceiling and be chosen for a beginner's part.

      Type Parameters

      • T

      Parameters

      • entry: Vocabulary<T>

        The entry to check.

      • label: string = 'vocabulary entry'

        Name used in the error message.

      Returns Vocabulary<T>

      The entry, unchanged.

      If the difficulty is outside 1..5 or the tempo band is inverted.