{"_id":"@typeschema/io-ts","_rev":"4-487240ce384cf3696bce6e5318fab8d5","name":"@typeschema/io-ts","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/io-ts","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/io-ts@0.13.0","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"aeca68cd8a8028821517415555785079facc9dbc","tarball":"https://registry.npmjs.org/@typeschema/io-ts/-/io-ts-0.13.0.tgz","fileCount":7,"integrity":"sha512-Z8fscHuqTPSr1XdySihJPhPzdEOhoIaQwVd49rRjR+VOS0esAjOyaxxvZThqN0te4oU4u1i5fKyP7NQksHVoBg==","signatures":[{"sig":"MEUCIQDy5dAGs40NyxyS7XXI+AvwpbIzYhL2WOeCygLDPK2GdQIgQZ4/DAtFAGQ1g16qxidmSUqlYrLfb9rKwCh/Dtid1qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10043},"main":"dist/index.js","_from":"file:typeschema-io-ts-0.13.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/f04579e16685369d9d1dbcb1b0ccfe39/typeschema-io-ts-0.13.0.tgz","_integrity":"sha512-Z8fscHuqTPSr1XdySihJPhPzdEOhoIaQwVd49rRjR+VOS0esAjOyaxxvZThqN0te4oU4u1i5fKyP7NQksHVoBg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for io-ts schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21","io-ts-types":"^0.5.19"},"peerDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"fp-ts":{"optional":true},"io-ts":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/io-ts_0.13.0_1708584802706_0.2831828880024967","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/io-ts","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/io-ts@0.13.1","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"05acc4015624aced3c4561ae4ba9783cc747c707","tarball":"https://registry.npmjs.org/@typeschema/io-ts/-/io-ts-0.13.1.tgz","fileCount":7,"integrity":"sha512-wK+w1bPkdMgnnXr8MZOyb6kXJM+hM1HTHP38t7Itm8U8CGc1lekD3klt7OSbrC8+2rsdWcByFgnxlsrFrd2z8g==","signatures":[{"sig":"MEYCIQDu5uGE1QYRoCNBa6ZPbVzivwCCY4e1UV4KOZWfRJ9rlgIhAPp3M30Cqnf1h+y1VT/YL+BqYgb8CMFBq4uN+zt5HmL8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10223},"main":"dist/index.js","_from":"file:typeschema-io-ts-0.13.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/bfb6290fddea6356b4fd9739d767cc82/typeschema-io-ts-0.13.1.tgz","_integrity":"sha512-wK+w1bPkdMgnnXr8MZOyb6kXJM+hM1HTHP38t7Itm8U8CGc1lekD3klt7OSbrC8+2rsdWcByFgnxlsrFrd2z8g==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for io-ts schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.1"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21","io-ts-types":"^0.5.19"},"peerDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"fp-ts":{"optional":true},"io-ts":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/io-ts_0.13.1_1708712690992_0.5890522701181573","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/io-ts","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/io-ts@0.13.2","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"a948a1517be9bfec0e065cf00ac773b5b6caed5c","tarball":"https://registry.npmjs.org/@typeschema/io-ts/-/io-ts-0.13.2.tgz","fileCount":7,"integrity":"sha512-M+GeXLhTuHsWVce+DC9J8sLUjOHCK38jIBNepei1WPvHoXErJsTFzeqQbbF9H2o5uXmEkJWt/4wx6r64Q6q27A==","signatures":[{"sig":"MEUCIEeur35zHX5pGetUaz6B9vCdHjUW2sWbt2OeSvQjfFEXAiEA1el3zEAv0HnFU3qFnkrH57F2SpMS24dE+oIUnRXf3Nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10285},"main":"dist/index.js","_from":"file:typeschema-io-ts-0.13.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/e3d40b12d37b692928270aa3e37b89d6/typeschema-io-ts-0.13.2.tgz","_integrity":"sha512-M+GeXLhTuHsWVce+DC9J8sLUjOHCK38jIBNepei1WPvHoXErJsTFzeqQbbF9H2o5uXmEkJWt/4wx6r64Q6q27A==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for io-ts schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21","io-ts-types":"^0.5.19"},"peerDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"fp-ts":{"optional":true},"io-ts":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/io-ts_0.13.2_1709024739374_0.2539314847677323","host":"s3://npm-registry-packages"}},"0.13.3":{"name":"@typeschema/io-ts","version":"0.13.3","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/io-ts@0.13.3","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"9a4889ae10b0c8aa535ed3d5176cd80b7d8a0b33","tarball":"https://registry.npmjs.org/@typeschema/io-ts/-/io-ts-0.13.3.tgz","fileCount":7,"integrity":"sha512-jHKOJpXABxSd3T4oEJx/3Ph490T5ynptDpWpoFiEUXy6jNoEdBANAH04utgeYwnGTFY12tFCA7drhg0DzdvuIg==","signatures":[{"sig":"MEQCIA/JvXIpU/b7qxxfsw+m8DLOflTTERvffg75wGG6fmtTAiAz/RM/7OD/YokY8tiRkcIXzyCuCCwxMeec2HDXPwdWew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11153},"main":"dist/index.js","_from":"file:typeschema-io-ts-0.13.3.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/e87e5b0e4c2f3d2048b26c542c74d792/typeschema-io-ts-0.13.3.tgz","_integrity":"sha512-jHKOJpXABxSd3T4oEJx/3Ph490T5ynptDpWpoFiEUXy6jNoEdBANAH04utgeYwnGTFY12tFCA7drhg0DzdvuIg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for io-ts schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21","io-ts-types":"^0.5.19"},"peerDependencies":{"fp-ts":"^2.16.2","io-ts":"^2.2.21"},"//devDependencies":"This field is manually maintained.","//peerDependencies":{"//":"This field is manually maintained.","fp-ts":"Required for inference and validation","io-ts":"Required for inference and validation"},"peerDependenciesMeta":{"fp-ts":{"optional":true},"io-ts":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/io-ts_0.13.3_1709278972673_0.6590228888103105","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/io-ts","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for io-ts schemas","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"homepage":"https://typeschema.com","license":"MIT","author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"dependencies":{"@typeschema/core":"0.14.0"},"//devDependencies":"This field is manually maintained.","devDependencies":{"fp-ts":"^2.16.9","io-ts":"^2.2.21","io-ts-types":"^0.5.19"},"//peerDependencies":{"//":"This field is manually maintained.","fp-ts":"Required for inference and validation","io-ts":"Required for inference and validation"},"peerDependencies":{"fp-ts":"^2.16.9","io-ts":"^2.2.21"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"fp-ts":{"optional":true},"io-ts":{"optional":true}},"scripts":{"build":"tsup --config ../../tsup.config.ts","lint":"eslint src --fix","lint:package":"publint && attw --pack","test":"vitest --config ../../vitest.config.ts","upgrade:deps":"ncu -u --dep=dev,peer --reject ow"},"_id":"@typeschema/io-ts@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-fh7t7F/L5LnMKuL/kd+W9qy1vztbLt8rWxiaLSu4t9Qlj9o53lP2Fi3FjjW+IP7BPZja7s48NK4M6pJNI6VuyQ==","_resolved":"/tmp/2e8483ba8e48b41d6fd60af67bcbb6ef/typeschema-io-ts-0.14.0.tgz","_from":"file:typeschema-io-ts-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-fh7t7F/L5LnMKuL/kd+W9qy1vztbLt8rWxiaLSu4t9Qlj9o53lP2Fi3FjjW+IP7BPZja7s48NK4M6pJNI6VuyQ==","shasum":"850456bbc878efe70072235ccbc68e282dc9ea79","tarball":"https://registry.npmjs.org/@typeschema/io-ts/-/io-ts-0.14.0.tgz","fileCount":7,"unpackedSize":11377,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwUDGiH1R1P+78AN0QcswaPP8GLL1fc1KAWxnHoYjGsgIhAINfwsFuHO8d8NQIioBeMLSv/F9af94JoUEgBiq5yRSh"}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/io-ts_0.14.0_1724625235588_0.05615548658123792"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:22.633Z","modified":"2024-08-25T22:33:55.978Z","0.13.0":"2024-02-22T06:53:22.962Z","0.13.1":"2024-02-23T18:24:51.154Z","0.13.2":"2024-02-27T09:05:39.539Z","0.13.3":"2024-03-01T07:42:52.819Z","0.14.0":"2024-08-25T22:33:55.737Z"},"bugs":{"url":"https://github.com/decs/typeschema/issues"},"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","homepage":"https://typeschema.com","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"description":"Reusable adapter for io-ts schemas","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"readme":"<!-- This file is generated. Do not modify it manually! -->\n\n<img src=\"https://typeschema.com/assets/logo.png\" width=\"64px\" alt=\"TypeSchema\" />\n<h1>@typeschema/io-ts</h1>\n<p>\n  <a href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/license/decs/typeschema\" alt=\"License\"></a>\n  <a href=\"https://bundlephobia.com/package/@typeschema/io-ts\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fio-ts\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/io-ts\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/io-ts.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/decs/typeschema/stargazers\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/stars/decs/typeschema\" alt=\"GitHub stars\"></a>\n</p>\n<p>\n  Reusable adapter for io-ts schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport * as ioTs from 'io-ts';\n\nimport {wrap} from '@typeschema/io-ts';\n\nconst schema = ioTs.type({name: ioTs.string});\n\nconst t = initTRPC.create();\nconst appRouter = t.router({\n  hello: t.procedure\n    .input(wrap(schema))\n    .query(({input}) => `Hello, ${input.name}!`),\n  //         ^? {name: string}\n});\n\n```\n\nUse it directly or through [`@typeschema/main`](https://github.com/decs/typeschema/tree/main/packages/main)\n\n## Dependencies\n- [`fp-ts`](https://www.npmjs.com/package/fp-ts): Required for inference and validation (`^2.16.9`)\n- [`io-ts`](https://www.npmjs.com/package/io-ts): Required for inference and validation (`^2.2.21`)\n\n## API\n\n### Inference\n- `Infer<TSchema>`: Extracts the output type of a schema\n- `InferIn<TSchema>`: 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","readmeFilename":"README.md"}