Skip to content

[F] getUniqueItems

function getUniqueItems(program, target): true | undefined;

Check if the given array is annotated with @uniqueItems decorator.

Returns true when the decorator is applied and undefined otherwise, so that callers can distinguish “not set” from “set” when building constraint objects.

ParameterType
programProgram
targetType

true | undefined