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

agg requires two type parameters #829

Closed
gudleik opened this issue Jan 2, 2024 · 1 comment
Closed

agg requires two type parameters #829

gudleik opened this issue Jan 2, 2024 · 1 comment
Labels
bug Something isn't working typescript Related to Typescript

Comments

@gudleik
Copy link

gudleik commented Jan 2, 2024

In version <0.27 we could do this:

const person = await db
  .selectFrom('person')
  .select(eb => eb.fn.agg<string[]>('array_agg', ['last_name']).as('names'))

But with version 0.27, typescript gives an error Expected 2 type arguments, but got 1.

Working example with v0.26.3: Playground Link

Same example with v0.27: Playground Link

@igalklebanov igalklebanov added bug Something isn't working typescript Related to Typescript labels Jan 2, 2024
@koskimas
Copy link
Member

koskimas commented Jan 2, 2024

Fixed in 0.27.1. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript Related to Typescript
Projects
None yet
Development

No branches or pull requests

3 participants