Type Alias: UniqueArrayConstraintsRecommended<T, U>
UniqueArrayConstraintsRecommended<
T,U> =UniqueArraySharedConstraints&object
Defined in: packages/fast-check/src/arbitrary/uniqueArray.ts:92
Constraints implying known and optimized comparison function to be applied on uniqueArray
Type Declaration
comparator?
optionalcomparator?:"SameValue"|"SameValueZero"|"IsStrictlyEqual"
The operator to be used to compare the values after having applied the selector (if any):
- SameValue behaves like
Object.is— https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevalue - SameValueZero behaves like
SetorMap— https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero - IsStrictlyEqual behaves like
===— https://tc39.es/ecma262/multipage/abstract-operations.html#sec-isstrictlyequal - Fully custom comparison function: it implies performance costs for large arrays
Default Value
'SameValue'
Remarks
Since 2.23.0
selector?
optionalselector?: (v) =>U
How we should project the values before comparing them together
Parameters
| Parameter | Type |
|---|---|
v | T |
Returns
U
Default Value
(v => v)
Remarks
Since 2.23.0
Type Parameters
| Type Parameter |
|---|
T |
U |
Remarks
Since 2.23.0