© 2026 Hedgehog Software, LLC
Schema.pattern
Schema.String
Schema.TemplateLiteralParser
const xSchema = S.String.pipe(S.pattern(/^x$/)); const schema = S.TemplateLiteralParser(xSchema, xSchema); expect(S.decodeSync(schema)('xx')).toEqual(['x', 'x']); Unknown Error: (`${string}${string}` <-> readonly [a string matching the pattern ^x$, a string matching the pattern ^x$]) └─ Type side transformation failure └─ readonly [a string matching the pattern ^x$, a string matching the pattern ^x$] └─ [0] └─ a string matching the pattern ^x$ └─ Predicate refinement failure └─ Expected a string matching the pattern ^x$, actual "xx"
Schema.Literal
TemplateLiteralParser