UNPKG

773 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const ARRAY_UNIQUE = "arrayUnique";
3export declare type ArrayUniqueIdentifier<T = any> = (o: T) => any;
4/**
5 * Checks if all array's values are unique. Comparison for objects is reference-based.
6 * If null or undefined is given then this function returns false.
7 */
8export declare function arrayUnique(array: unknown[], identifier?: ArrayUniqueIdentifier): boolean;
9/**
10 * Checks if all array's values are unique. Comparison for objects is reference-based.
11 * If null or undefined is given then this function returns false.
12 */
13export declare function ArrayUnique<T = any>(identifierOrOptions?: ArrayUniqueIdentifier<T> | ValidationOptions, validationOptions?: ValidationOptions): PropertyDecorator;