We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c97f9c8 commit be232faCopy full SHA for be232fa
src/vendors/arktype.ts
@@ -2,7 +2,7 @@ import type { Type } from "arktype";
2
import type { JSONSchema7 } from "json-schema";
3
import type { ToJsonSchemaFn } from "./utils.js";
4
5
-export default async function getToJsonSchemaFn(): Promise<ToJsonSchemaFn> {
+export default function getToJsonSchemaFn(): ToJsonSchemaFn {
6
return (schema, options) =>
7
(schema as Type).toJsonSchema(options) as JSONSchema7;
8
}
src/vendors/index.ts
@@ -12,7 +12,7 @@ export const getToJsonSchemaFn = async (
12
return cached;
13
14
15
- let vendorFnPromise: Promise<ToJsonSchemaFn>;
+ let vendorFnPromise: ToJsonSchemaFn | Promise<ToJsonSchemaFn>;
16
17
switch (vendor) {
18
case "arktype":
0 commit comments