StringThe string type with optional validation checks.
Details
checks holds string-specific constraints, such as min/max length, pattern,
and UUID checks. contentMediaType and contentSchema indicate that the
string contains encoded data, such as "application/json" with a nested
schema.
Source effect/SchemaRepresentation.ts:1927 lines
export interface String {
readonly String._tag: "String"_tag: "String"
readonly String.annotations?: anyannotations?: import SchemaSchema.declareAnnotations.type Schema.Annotations.Annotations = /*unresolved*/ anyAnnotations | undefined
readonly String.checks: ReadonlyArray<Check<StringMeta>>checks: interface ReadonlyArray<T>ReadonlyArray<type Check<M> = Filter<M> | FilterGroup<M>A validation constraint attached to a type. Either a single
Filter
or a
FilterGroup
combining multiple checks.
Check<type StringMeta = anyMetadata union for string-specific validation checks (minLength, maxLength,
pattern, UUID, trimmed, etc.).
StringMeta>>
readonly String.contentMediaType?: string | undefinedcontentMediaType?: string | undefined
readonly String.contentSchema?: Representation | undefinedcontentSchema?: type Representation =
| Declaration
| Reference
| Suspend
| Null
| Undefined
| Void
| Never
| Unknown
| Any
| String
| Number
| Boolean
| BigInt
| Symbol
| Literal
| UniqueSymbol
| ObjectKeyword
| Enum
| TemplateLiteral
| Arrays
| Objects
| Union
The core tagged union of all supported schema shapes.
Details
Each variant has a _tag discriminator. Switch on _tag to handle each
shape. Most variants carry optional annotations and some carry checks
for validation constraints.
Representation | undefined
}Referenced by 2 symbols