0.13.9 • Published 21 days ago

@typeschema/main v0.13.9

Weekly downloads
-
License
MIT
Repository
github
Last release
21 days ago

API

Inference

  • Infer<TSchema>: Extracts the output type of a schema
  • InferIn<TSchema>: Extracts the input type of a schema

Validation

  • wrap(schema): Returns the wrapped schema with access to its operations
  • validate(schema, data): Returns the validated data or a list of validation issues
  • assert(schema, data): Returns the validated data or throws an AggregateError

Serialization

  • toJSONSchema(schema): Converts the schema into the equivalent JSON schema