Skip to content

Commit

Permalink
fix: IfDefined returning any
Browse files Browse the repository at this point in the history
  • Loading branch information
lobomfz committed Jul 20, 2024
1 parent 1cb5a18 commit 2251f01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-carrots-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typeschema/core": minor
---

Fixes detection of installed adapters
3 changes: 1 addition & 2 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {Resolver, SchemaFrom} from './resolver';

export type IfDefined<TValue, TModule extends string = ''> = 0 extends 1 &
TValue
export type IfDefined<TValue, TModule extends string = ''> = unknown extends TValue
? TModule extends ''
? never
: `Cannot find module '${TModule}'`
Expand Down

0 comments on commit 2251f01

Please sign in to comment.