Checks if the given value is a Map whose keys are all unique with regard to the given projection.
// Ensure there are no duplicate user ids in the map.@MapUniqueKeys<User>(user => user.id)postsByUser: Map<User, Post[]> Copy
// Ensure there are no duplicate user ids in the map.@MapUniqueKeys<User>(user => user.id)postsByUser: Map<User, Post[]>
The type of the map's keys.
The type returned by projection.
projection
The function mapping each key to the value that is used for the uniqueness check.
Optional
Generic class-validator options.
Checks if the given value is a Map whose keys are all unique with regard to the given projection.
Example