Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong TypeScript type when using .count('*') #6077

Open
KristjanTammekivi opened this issue May 21, 2024 · 0 comments
Open

Wrong TypeScript type when using .count('*') #6077

KristjanTammekivi opened this issue May 21, 2024 · 0 comments

Comments

@KristjanTammekivi
Copy link
Contributor

Environment

Knex version: 3.1.0
Database + version: PostgreSQL 14
OS: Linux pop-os 6.8.0

Select applicable template from below.
@lorefnon

Bug

  1. Explain what kind of behaviour you are getting and how you think it should do

Incorrect TypeScript type when using .count('*'). It currently shows that result is a string, but in reality it's an object { count: string }. .count(validFieldName) and .count() resolve to Dict

  1. Error message

  2. Reduced test code

https://github.com/KristjanTammekivi/knex-bug-report

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

No branches or pull requests

1 participant