Revision 0.8.3 (#12)

* Provide Access to JIT Code

* Version
This commit is contained in:
sinclairzx81
2025-01-27 04:14:03 +09:00
committed by GitHub
parent 71f64de517
commit 3282611a52
3 changed files with 7 additions and 3 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@sinclair/typemap",
"version": "0.8.2",
"version": "0.8.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@sinclair/typemap",
"version": "0.8.2",
"version": "0.8.3",
"license": "MIT",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@sinclair/typemap",
"version": "0.8.2",
"version": "0.8.3",
"description": "Uniform Syntax, Mapping and Compiler Library for TypeBox, Valibot and Zod",
"author": "sinclairzx81",
"license": "MIT",

View File

@@ -82,6 +82,10 @@ export class Validator<Type extends t.TSchema> implements StandardSchemaV1<Type,
public get ['~standard'](): StandardSchemaProps<Type> {
return this.#standard
}
/** Returns the code used by this validator. */
public Code(): string {
return this.#check.Code()
}
/** Parses this value. Do not use this function for high throughput validation */
public Parse(value: unknown): t.StaticDecode<Type> {
return Value.Parse(this.#check.Schema(), value)