Skip to content

Resolve Parameters<> of where(), findOne(), whereIn() and select() to their loose arguments in loose mode - #480

Merged
lehni merged 1 commit into
nextfrom
fix/typings-loose-parameters
Oct 15, 2026
Merged

lehni merged 1 commit into
nextfrom
fix/typings-loose-parameters

Conversation

@lehni

@lehni lehni commented Oct 15, 2026

Copy link
Copy Markdown

In rc.4, the last overloads of where(), findOne(), whereIn() and select() are strict-only, so in loose mode Parameters<> resolves them to never, and wrappers that forward their arguments break. 3.9.1 accepted them.

The last overload of each now takes the loose arguments in loose mode and stays the strict check in strict mode, where it still reports the errors. The autocompletion overloads are unchanged. In loose mode whereIn() now forwards all its values, where 3.9.1 only took query builders. Forwarding where(column, value) through Parameters<> wasn't possible in 3.9.1 either, as its last overload took an object.

Adds type tests for the forwarding in loose and strict mode.

@lehni
lehni merged commit a3d403a into next Oct 15, 2026
5 checks passed
@lehni
lehni deleted the fix/typings-loose-parameters branch October 16, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant