From 6dda722dee984f6adf35aca1599f1abda3c00551 Mon Sep 17 00:00:00 2001 From: nlfmt Date: Sat, 5 Oct 2024 02:02:07 +0200 Subject: [PATCH] fix: Schema is not inferred when typebox is not installed --- packages/main/src/selector.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/main/src/selector.ts b/packages/main/src/selector.ts index ff2ba0e..9cb7990 100644 --- a/packages/main/src/selector.ts +++ b/packages/main/src/selector.ts @@ -1,13 +1,11 @@ import type {AdapterResolvers} from './adapters'; import type {AdapterResolver} from './resolver'; -import type {Kind} from '@sinclair/typebox'; import type {IfDefined, SchemaFrom} from '@typeschema/core'; import type {CoreValidator} from 'suretype'; // prettier-ignore type IsTypeboxSchema = - [IfDefined] extends [never] ? false - : TSchema extends {[Kind]: unknown} ? true + TSchema extends {static: unknown, params: unknown[]} ? true : false; function isTypeboxSchema( schema: SchemaFrom,