• Checks if the given value is a Map and contains all required keys.

    // Ensure the map contains (at least) the keys 13 and 42.
    @MapContainsKeys([13, 42])
    values: Map<number, string>

    Type Parameters

    • Key = unknown

      The type of keys to check for.

    Parameters

    • required: Key[]

      The keys required in the given map.

    • Optionaloptions: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator