How jquense/yup works
Yup is a TypeScript runtime schema library: callers compose schemas, then cast or validate values to obtain parsed results or validation errors. The documented workflow spans schema construction, coercion/transforms, assertions (including asynchronous tests), and typed results; object schemas also validate nested fields, while conditions and references support interdependent rules. The graph preserves the major schema families, Standard Schema compatibility, localization and error reporting. Some implementation links rely on the SOURCE INDEX import references; unsampled details are not inferred.
Main entry points: index.ts Exports And Factories · schema.ts Schema Core · ValidationError.ts Validation Errors · createValidation.ts Test Runner
Components 21
Public API
- Exports And Factories
src/index.ts
Schema Engine
- Schema Core
src/schema.ts - Conditional Rules
src/Condition.ts - Value References
src/Reference.ts - Test Runner
src/util/createValidation.ts - Standard Schema
src/standardSchema.ts
Schema Families
- Mixed Schema
src/mixed.ts - String Schema
src/string.ts - Number Schema
src/number.ts - Boolean Schema
src/boolean.ts - Date Schema
src/date.ts - Object Schema
src/object.ts - Array Schema
src/array.ts - Tuple Schema
src/tuple.ts - Lazy Schema
src/Lazy.ts
Errors And Support
- Validation Errors
src/ValidationError.ts - Messages And Locale
src/locale.ts - Locale Configuration
src/setLocale.ts - Type Inference
src/types.ts - Nested Path Lookup
src/util/reach.ts
Other components
- Application
Connections 38
- Application → Exports And Factories: uses API
README.md - Exports And Factories → Schema Core: exports
src/index.ts - Exports And Factories → Mixed Schema: exports
src/index.ts - Exports And Factories → String Schema: exports
src/index.ts - Exports And Factories → Number Schema: exports
src/index.ts - Exports And Factories → Boolean Schema: exports
src/index.ts - Exports And Factories → Date Schema: exports
src/index.ts - Exports And Factories → Object Schema: exports
src/index.ts - Exports And Factories → Array Schema: exports
src/index.ts - Exports And Factories → Tuple Schema: exports
src/index.ts - Exports And Factories → Lazy Schema: exports
src/index.ts - Exports And Factories → Value References: exports
src/index.ts - Exports And Factories → Validation Errors: exports
src/index.ts - Exports And Factories → Nested Path Lookup: exports
src/index.ts - Schema Core → Conditional Rules: resolves conditions
src/schema.ts - Schema Core → Value References: resolves references
src/schema.ts - Schema Core → Test Runner: runs tests
src/schema.ts - Schema Core → Standard Schema: adapts validation
src/schema.ts - Schema Core → Nested Path Lookup: looks up paths
src/schema.ts - Schema Core → Validation Errors: raises errors
src/schema.ts - Test Runner → Value References: resolves values
src/util/createValidation.ts - Test Runner → Validation Errors: creates errors
src/util/createValidation.ts - Conditional Rules → Value References: reads dependencies
src/Condition.ts - Object Schema → Schema Core: extends core
src/object.ts - Object Schema → Test Runner: runs field tests
src/object.ts - Array Schema → Schema Core: extends core
src/array.ts - String Schema → Schema Core: extends core
src/string.ts - Number Schema → Schema Core: extends core
src/number.ts - Date Schema → Schema Core: extends core
src/date.ts - Boolean Schema → Schema Core: extends core
src/boolean.ts - Mixed Schema → Schema Core: extends core
src/mixed.ts - Tuple Schema → Schema Core: extends core
src/tuple.ts - Lazy Schema → Schema Core: resolves schemas
src/Lazy.ts - Standard Schema → Validation Errors: converts issues
src/standardSchema.ts - Messages And Locale → Validation Errors: formats messages
src/locale.ts - Locale Configuration → Messages And Locale: sets messages
src/setLocale.ts - Exports And Factories → Locale Configuration: exports
src/index.ts - Exports And Factories → Type Inference: exports types
src/index.ts