set
@tsed/schema
Usage
typescript
import { set } from "@tsed/schema";Overview
ts
function set(): JsonSchema<Set<any>>;
export function set<I>(item: JsonSchema<I>): JsonSchema<Set<I>>;Description
Declare a new array model representing a Set with uniqueItems: true. If an item schema is provided, it will be set as items and its type will be inferred as Set<I>.
json
{ "type": "array", "uniqueItems": true }See JsonSchema to discover available methods.