Creates a string shape.
Contradictory constraints are rejected as the shape is built, so a shape that exists admits at least one value.
The stated constraints
Optionalconstraints: COptional shape constraints
An immutable shape admitting the strings the constraints bound, narrowed to the values they enumerate
TraceError Where the stated constraints contradict one another
Creates a string shape admitting an enumerated set of values.
Reads bare strings as the enumeration closing the domain to them, so that a set of admitted values is stated as
string("open", "closed") rather than as string({ in: ["open", "closed"] }).
The values the shape admits
The admitted values
An immutable shape admitting values alone
Creates a string shape.