Skip to content

Commit

Permalink
Merge pull request #70 from nlfmt/main
Browse files Browse the repository at this point in the history
Fix Schema is not inferred when typebox is not installed for @typeschema/main
  • Loading branch information
decs authored Oct 13, 2024
2 parents d7e9ade + 6dda722 commit e7385a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/main/src/selector.ts
Original file line number Diff line number Diff line change
@@ -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<TSchema> =
[IfDefined<typeof Kind>] extends [never] ? false
: TSchema extends {[Kind]: unknown} ? true
TSchema extends {static: unknown, params: unknown[]} ? true
: false;
function isTypeboxSchema(
schema: SchemaFrom<AdapterResolver>,
Expand Down

0 comments on commit e7385a6

Please sign in to comment.