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

Typings of aggregate functions (count, max etc.) are missing options object ("as" alias) #4165

Closed
tkalliom opened this issue Dec 17, 2020 · 2 comments · Fixed by #4491
Closed

Comments

@tkalliom
Copy link
Contributor

Environment

Knex version: 0.21.13
Database + version: N/A
OS: N/A

Issue is about TypeScript definitions, @lorefnon

Bug

As stated in the documentation, count, min etc. take an optional options object, with the key as specifying an alias for the aggregate value. However, the types AsymmetricAggregation and TypePreservingAggregation only have the ...columnNames parameter; the options object is missing from the typings.

@kibertoad
Copy link
Collaborator

@tkalliom Would you be open to sending a PR for this?

@kibertoad
Copy link
Collaborator

Released in 0.95.7

OlivierCavadenti pushed a commit to AbeonaPascha/knex that referenced this issue Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants