{"_id":"@typeschema/function","_rev":"3-e8e91de03661dd5b9929cd87c5e87849","name":"@typeschema/function","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/function","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/function@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":"d26449b173f4972122c1325c9176609df454d0ae","tarball":"https://registry.npmjs.org/@typeschema/function/-/function-0.13.0.tgz","fileCount":7,"integrity":"sha512-bZyMS+sFE8XKpA4/EAx9x8ks2ttsMX/FJlc+u2O6/MaM8w9SJ39OxUKlRg9at+141zzu0Xu8XpSs5aGtFJHZjQ==","signatures":[{"sig":"MEUCIQDGHoFMlq1Wigt89q8Ay1sPwAkH663wWLOEqsuZv4LU+QIgRp64tGnzdP2FeW/xFxEMqgORPq244HqghtX43rySlNk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9328},"main":"dist/index.js","_from":"file:typeschema-function-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/b28822ed88068fbf98cad6cb0b3a39f7/typeschema-function-0.13.0.tgz","_integrity":"sha512-bZyMS+sFE8XKpA4/EAx9x8ks2ttsMX/FJlc+u2O6/MaM8w9SJ39OxUKlRg9at+141zzu0Xu8XpSs5aGtFJHZjQ==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for function-based schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"typia":"^5.3.11"},"peerDependencies":{},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/function_0.13.0_1708584800118_0.27669360905708973","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/function","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/function@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":"62d6d36ef49c64283e5cd93b28bb5f87d9c81df5","tarball":"https://registry.npmjs.org/@typeschema/function/-/function-0.13.1.tgz","fileCount":7,"integrity":"sha512-HcAnLbFQKbhhJqckUsd/gEnURv8GMOtSwNw/nOcU9al9J18kDXoCUrZraTclS6tpcdotU7Eq83i2ii8vvdog2Q==","signatures":[{"sig":"MEQCIEI94wK5Wv90ZSg3crslRPbYi0L8ANwaZIRWfOurAN1gAiBvrQucLXdxCq/x+dFEovkG5pSQcSH0DEdAZec7R+rZkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9508},"main":"dist/index.js","_from":"file:typeschema-function-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/d7aae66bec8dd8e74115c8101c9e2281/typeschema-function-0.13.1.tgz","_integrity":"sha512-HcAnLbFQKbhhJqckUsd/gEnURv8GMOtSwNw/nOcU9al9J18kDXoCUrZraTclS6tpcdotU7Eq83i2ii8vvdog2Q==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for function-based 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":{"typia":"^5.3.11"},"peerDependencies":{},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/function_0.13.1_1708712690941_0.22182606815910288","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/function","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/function@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":"a821edcaca0ae5ef5005d3f84077158cb2c2848f","tarball":"https://registry.npmjs.org/@typeschema/function/-/function-0.13.2.tgz","fileCount":7,"integrity":"sha512-BrvjQPcXiYnl5i5S059lrIm/6uGPGuLObYdU4j/Bukmf/9vJKyIPOZWIdFDX7TqAOwUA3S4MiyvPPG0o8p4FLQ==","signatures":[{"sig":"MEQCIQDvMeoCfEl5uZfihdlAGrx7+58dcLS4M4JOw6hH5B9zHgIfOQq4Y8oFL4vraksR1xLaBoV81RfspYUzJcm/EhZ/Tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9508},"main":"dist/index.js","_from":"file:typeschema-function-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/8369f33fd7484eb1acdc07db69b28b34/typeschema-function-0.13.2.tgz","_integrity":"sha512-BrvjQPcXiYnl5i5S059lrIm/6uGPGuLObYdU4j/Bukmf/9vJKyIPOZWIdFDX7TqAOwUA3S4MiyvPPG0o8p4FLQ==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for function-based 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":{"typia":"^5.3.11"},"peerDependencies":{},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/function_0.13.2_1709024739384_0.12808300819457097","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/function","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for function-based 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":{"typia":"^6.9.0"},"//peerDependencies":"This field is manually maintained.","peerDependencies":{},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{},"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/function@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-ZoOyx+ACG6Sax4nFWR5Va3eWpRXXm4Cr5y5T3i4yNKOwReaHa6UNrz2t31ToiXfT18Hbp6xTUZeu0qXLiJwDQg==","_resolved":"/tmp/0f9457f939946e90f62d51ce6a98e361/typeschema-function-0.14.0.tgz","_from":"file:typeschema-function-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-ZoOyx+ACG6Sax4nFWR5Va3eWpRXXm4Cr5y5T3i4yNKOwReaHa6UNrz2t31ToiXfT18Hbp6xTUZeu0qXLiJwDQg==","shasum":"c017dacc82789606b124fd48015a97b69ccde697","tarball":"https://registry.npmjs.org/@typeschema/function/-/function-0.14.0.tgz","fileCount":7,"unpackedSize":9559,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHUkkcmKkldG53WOHg8lnrgFjYQ3HP1QY1A0/1l1wjHsAiBrDW2nKself3BwMqe+GsPLXVJp7jf1Xmbp1vDVcUtbpw=="}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/function_0.14.0_1724625235628_0.8261670577316482"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:20.040Z","modified":"2024-08-25T22:33:55.946Z","0.13.0":"2024-02-22T06:53:20.271Z","0.13.1":"2024-02-23T18:24:51.115Z","0.13.2":"2024-02-27T09:05:39.549Z","0.14.0":"2024-08-25T22:33:55.764Z"},"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 function-based 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/function</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/function\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Ffunction\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/function\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/function.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 function-based schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport typia from 'typia';\n\nimport {wrap} from '@typeschema/function';\n\nconst schema = typia.createAssert<{name: 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## 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"}