{"id":13791592,"url":"https://github.com/decs/typeschema","last_synced_at":"2025-05-15T15:07:13.126Z","repository":{"id":177946661,"uuid":"661140802","full_name":"decs/typeschema","owner":"decs","description":"🛵 Universal adapter for TypeScript schema validation.","archived":false,"fork":false,"pushed_at":"2024-10-14T03:27:27.000Z","size":1753,"stargazers_count":443,"open_issues_count":13,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T23:14:54.580Z","etag":null,"topics":["adapter","assert","inference","schema","type","typescript","validation"],"latest_commit_sha":null,"homepage":"https://typeschema.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-01T23:13:19.000Z","updated_at":"2025-05-06T14:09:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d9ba347-e570-4e82-93cc-cde69519f790","html_url":"https://github.com/decs/typeschema","commit_stats":null,"previous_names":["decs/typeschema"],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decs%2Ftypeschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decs%2Ftypeschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decs%2Ftypeschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decs%2Ftypeschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decs","download_url":"https://codeload.github.com/decs/typeschema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253371123,"owners_count":21898005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter","assert","inference","schema","type","typescript","validation"],"created_at":"2024-08-03T22:01:02.237Z","updated_at":"2025-05-15T15:07:08.116Z","avatar_url":"https://github.com/decs.png","language":"TypeScript","readme":"\u003c!-- This file is generated. Do not modify it manually! --\u003e\n\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://typeschema.com/assets/logo.png\" width=\"64px\" alt=\"TypeSchema\" /\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\n  TypeSchema\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  Universal adapter for schema validation\n  \u003cbr /\u003e\n  ✨ \u003ca href=\"https://typeschema.com\"\u003ehttps://typeschema.com\u003c/a\u003e ✨\n\u003c/p\u003e\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/license/decs/typeschema\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/package/@typeschema/main\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fmain\" alt=\"Bundle size\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@typeschema/core\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/core.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/decs/typeschema/stargazers\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/decs/typeschema\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quickstart\"\u003eQuickstart\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#coverage\"\u003eCoverage\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#api\"\u003eAPI\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://github.com/decs/typeschema\"\u003eGitHub\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@typeschema/main\"\u003enpm\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n\u003e When fetching data from an external source, it's important to verify its integrity. This happens when processing user inputs, calling third-party APIs, loading configuration files, and so on. And the thing is: Typescript doesn't come with runtime validation. Any type assertions are [removed at compile-time](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions).\n\u003e \n\u003e As a result, developers turn to third-party validation libraries. But that landscape is fragmented, lacking a single best option. Each offers different trade-offs on developer experience, bundle size, and community support.\n\u003e \n\u003e TypeSchema enables writing code that [works with any validation library](#coverage) out-of-the-box. It provides a universal adapter for interacting with any validation schema, decoupling from implementation specifics and increasing compatibility.\n\n```ts\nimport {validate} from '@typeschema/main';\n\nimport {z} from 'zod';\nimport {string} from 'valibot';\n\nconst zodSchema = z.string();\nawait validate(zodSchema, '123');\n//    ^? {success: true, data: '123'}\n\nconst valibotSchema = string();\nawait validate(valibotSchema, 123);\n//    ^? {success: false, issues: [...]}\n```\n\n## Quickstart\n\nWe value flexibility, which is why there are multiple ways of using TypeSchema:\n1. **Using an adapter directly** (e.g. [`@typeschema/valibot`](https://github.com/decs/typeschema/tree/main/packages/valibot)): Best pick for end developers, when the validation library is known ahead of time. This is particularly useful for supporting more validation libraries on [tRPC](https://trpc.io/).\n2. **Handpicking adapters** with [`@typeschema/main`](https://github.com/decs/typeschema/tree/main/packages/main): Recommended for library maintainers. Any validation library can be used, but adapters have to be explicitly installed. This allows end developers to trade-off between coverage and bundle size.\n3. **Batteries included** with [`@typeschema/all`](https://github.com/decs/typeschema/tree/main/packages/all): Easiest to use. All adapters are automatically installed, including future ones. This is a drop-in replacement for the deprecated [`@decs/typeschema`](https://www.npmjs.com/package/@decs/typeschema).\n\n## Coverage\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth align=\"left\"\u003eProject\u003c/th\u003e\n    \u003cth align=\"left\"\u003ePopularity\u003c/th\u003e\n    \u003cth align=\"center\"\u003e\u003ccode\u003eInfer\u003c/code\u003e\u003c/th\u003e\n    \u003cth align=\"center\"\u003e\u003ccode\u003eInferIn\u003c/code\u003e\u003c/th\u003e\n    \u003cth align=\"center\"\u003eValidation\u003c/th\u003e\n    \u003cth align=\"center\"\u003eSerialization\u003c/th\u003e\n    \u003cth align=\"left\"\u003eAdapter\u003c/th\u003e\n    \u003cth align=\"right\"\u003eDownloads\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://zod.dev\" rel=\"nofollow\"\u003ezod\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/colinhacks/zod\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/colinhacks/zod?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/zod\"\u003e@typeschema/zod\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/zod\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/zod.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/jquense/yup\" rel=\"nofollow\"\u003eyup\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/jquense/yup\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/jquense/yup?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/yup\"\u003e@typeschema/yup\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/yup\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/yup.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://joi.dev\" rel=\"nofollow\"\u003ejoi\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/hapijs/joi\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/hapijs/joi?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/joi\"\u003e@typeschema/joi\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/joi\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/joi.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://ajv.js.org\" rel=\"nofollow\"\u003eajv\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/ajv-validator/ajv\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/ajv-validator/ajv?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/json\"\u003e@typeschema/json\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/json\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/json.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/typestack/class-validator\" rel=\"nofollow\"\u003eclass-validator\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/typestack/class-validator\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/typestack/class-validator?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/class-validator\"\u003e@typeschema/class-validator\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/class-validator\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/class-validator.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://effect.website\" rel=\"nofollow\"\u003eeffect\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/effect-ts/effect\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/effect-ts/effect?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/effect\"\u003e@typeschema/effect\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/effect\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/effect.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://docs.superstructjs.org\" rel=\"nofollow\"\u003esuperstruct\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/ianstormtaylor/superstruct\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/ianstormtaylor/superstruct?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/superstruct\"\u003e@typeschema/superstruct\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/superstruct\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/superstruct.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://gcanti.github.io/io-ts\" rel=\"nofollow\"\u003eio-ts\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/gcanti/io-ts\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/gcanti/io-ts?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/io-ts\"\u003e@typeschema/io-ts\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/io-ts\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/io-ts.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://valibot.dev\" rel=\"nofollow\"\u003evalibot\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/fabian-hiller/valibot\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/fabian-hiller/valibot?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/valibot\"\u003e@typeschema/valibot\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/valibot\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/valibot.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/sinclairzx81/typebox\" rel=\"nofollow\"\u003etypebox\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/sinclairzx81/typebox\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/sinclairzx81/typebox?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/typebox\"\u003e@typeschema/typebox\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/typebox\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/typebox.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://typia.io\" rel=\"nofollow\"\u003etypia\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/samchon/typia\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/samchon/typia?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/function\"\u003e@typeschema/function\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/function\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/function.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://arktype.io\" rel=\"nofollow\"\u003earktype\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/arktypeio/arktype\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/arktypeio/arktype?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/arktype\"\u003e@typeschema/arktype\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/arktype\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/arktype.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://sindresorhus.com/ow\" rel=\"nofollow\"\u003eow\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/sindresorhus/ow\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/sindresorhus/ow?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/ow\"\u003e@typeschema/ow\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/ow\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/ow.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://deepkit.io\" rel=\"nofollow\"\u003edeepkit\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/deepkit/deepkit-framework\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/deepkit/deepkit-framework?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/deepkit\"\u003e@typeschema/deepkit\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/deepkit\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/deepkit.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/pelotom/runtypes\" rel=\"nofollow\"\u003eruntypes\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/pelotom/runtypes\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/pelotom/runtypes?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/runtypes\"\u003e@typeschema/runtypes\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/runtypes\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/runtypes.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/icebob/fastest-validator\" rel=\"nofollow\"\u003efastest-validator\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/icebob/fastest-validator\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/icebob/fastest-validator?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/fastest-validator\"\u003e@typeschema/fastest-validator\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/fastest-validator\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/fastest-validator.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://vinejs.dev\" rel=\"nofollow\"\u003evine\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/vinejs/vine\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/vinejs/vine?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/vine\"\u003e@typeschema/vine\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/vine\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/vine.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/grantila/suretype\" rel=\"nofollow\"\u003esuretype\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/grantila/suretype\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/grantila/suretype?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/suretype\"\u003e@typeschema/suretype\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/suretype\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/suretype.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ca href=\"https://github.com/badrap/valita\" rel=\"nofollow\"\u003evalita\u003c/a\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003ca href=\"https://github.com/badrap/valita\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/badrap/valita?style=social\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e✅\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e🧐\u003c/td\u003e\n    \u003ctd align=\"left\"\u003e\u003cnobr\u003e\u003ccode\u003e\u003ca href=\"https://github.com/decs/typeschema/tree/main/packages/valita\"\u003e@typeschema/valita\u003c/a\u003e\u003c/code\u003e\u003c/nobr\u003e\u003c/td\u003e\n    \u003ctd align=\"right\"\u003e\u003ca href=\"https://www.npmjs.com/package/@typeschema/valita\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@typeschema/valita.svg?label=\" alt=\"npm downloads\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003e [!NOTE]\n\u003e Don't see your favorite validation library?\n\u003e We welcome [PRs](https://github.com/decs/typeschema/pulls)!\n\u003e Otherwise, please [file an issue](https://github.com/decs/typeschema/issues) to help us prioritize. 🙌\n\n## API\n\n### Inference\n- `Infer\u003cTSchema\u003e`: Extracts the output type of a schema\n- `InferIn\u003cTSchema\u003e`: Extracts the input type of a schema\n\n### Validation\n- `wrap(schema)`: Returns the wrapped schema with access to its operations\n- `validate(schema, data)`: Returns the validated data or a list of validation issues\n- `assert(schema, data)`: Returns the validated data or throws an `AggregateError`\n\n### Serialization\n- `toJSONSchema(schema)`: Converts the schema into the equivalent JSON schema\n\n## Acknowledgements\n\n- Inspired by [tRPC](https://trpc.io/)'s [input \u0026 output validators](https://trpc.io/docs/server/validators)\n- Adapter architecture inspired by [@ecyrbe](https://github.com/ecyrbe)'s [suggestions](https://github.com/decs/typeschema/issues/1)\n- API definition inspired by [@colinhacks](https://github.com/colinhacks)'s [proposal](https://twitter.com/colinhacks/status/1634284724796661761)\n- Logo designed by [flaticon](https://www.flaticon.com/)\n","funding_links":[],"categories":["typescript","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecs%2Ftypeschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecs%2Ftypeschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecs%2Ftypeschema/lists"}