diff --git a/CHANGELOG.md b/CHANGELOG.md index 911d383..7eb84e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [0.8.2] - 2024-XX-XX + +### Changed + +- `z` "slow types" workaround attempt: `SubsetOfZ` + ## [0.8.1] - 2024-07-11 ### Added diff --git a/deps.ts b/deps.ts index 43da735..6056b22 100644 --- a/deps.ts +++ b/deps.ts @@ -36,9 +36,44 @@ export { type OpenAPIObjectConfig } from "npm:@asteasolutions/zod-to-openapi@^7. // must import from `npm:` instead of from `deno.land` to be compatible with `@asteasolutions/zod-to-openapi` import { z as slowTypedZ } from "npm:zod@^3.23.8"; extendZodWithOpenApi(slowTypedZ); -type ExplicitZ = Omit; +type SubsetOfZ = Pick< + typeof slowTypedZ, + | "string" + | "object" + | "array" + | "number" + | "boolean" + | "date" + | "any" + | "enum" + | "function" + | "lazy" + | "void" + | "promise" + | "null" + | "never" + | "map" + | "bigint" + | "symbol" + | "strictObject" + | "transformer" + | "literal" + | "coerce" + | "custom" + | "util" + | "tuple" + | "record" + | "preprocess" + | "nan" + | "datetimeRegex" + | "discriminatedUnion" + | "intersection" + | "pipeline" + | "ZodSchema" + | "Schema" +>; /** * entry to the `Zod` API, enhanced with `@asteasolutions/zod-to-openapi`; * for usage documentation please refer to https://github.com/asteasolutions/zod-to-openapi?tab=readme-ov-file#purpose-and-quick-example */ -export const z: ExplicitZ = slowTypedZ; +export const z: SubsetOfZ = slowTypedZ; diff --git a/jsr.json b/jsr.json index 721b274..df63a0f 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@dklab/oak-routing-ctrl", - "version": "0.8.1", + "version": "0.8.2-alpha.1", "exports": { ".": "./mod.ts", "./mod": "./mod.ts"