Checks if the given value is a Map without duplicates with regard to the given projection.
// Ensure the map does not include duplicate users.@MapUnique<User>(user => user.id)usersByEmail: Map<string, User> Copy
// Ensure the map does not include duplicate users.@MapUnique<User>(user => user.id)usersByEmail: Map<string, User>
The type of the map's values.
The type returned by projection.
projection
The function mapping each map entry to the value that is used for the uniqueness check.
Optional
Generic class-validator options.
Checks if the given value is a Map without duplicates with regard to the given projection.
Example