From 3282611a523bdd33d517d80fe06619d42b82c805 Mon Sep 17 00:00:00 2001 From: sinclairzx81 Date: Mon, 27 Jan 2025 04:14:03 +0900 Subject: [PATCH] Revision 0.8.3 (#12) * Provide Access to JIT Code * Version --- package-lock.json | 4 ++-- package.json | 2 +- src/compile/compile.ts | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4be964a..256ff65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 37be179..c999314 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/compile/compile.ts b/src/compile/compile.ts index 66b518d..fd48672 100644 --- a/src/compile/compile.ts +++ b/src/compile/compile.ts @@ -82,6 +82,10 @@ export class Validator implements StandardSchemaV1 { 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 { return Value.Parse(this.#check.Schema(), value)