Set<T, Input = unknown>(item: Schema<T>): Schema<Set<T>, unknown>
item: Schema<T>
import { x } from 'unhoax'x.Set(x.string).parse(new Set(['a', 'b']))// { success: true, value: Set { 'a', 'b' } }x.Set(x.string).parse(['a', 'b'])// { success: true, value: Set { 'a', 'b' } } Copy
import { x } from 'unhoax'x.Set(x.string).parse(new Set(['a', 'b']))// { success: true, value: Set { 'a', 'b' } }x.Set(x.string).parse(['a', 'b'])// { success: true, value: Set { 'a', 'b' } }
See
Example