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

nguymin4/update typings #4377

Merged
merged 2 commits into from Mar 25, 2021
Merged

nguymin4/update typings #4377

merged 2 commits into from Mar 25, 2021

Conversation

nguymin4
Copy link
Contributor

@nguymin4 nguymin4 commented Mar 16, 2021

Update typings for

await knexInstance<User>('users')
    .min('age', {as: 'a'})
    .max('age', {as: 'b'});
  • stream() AsyncInterable
const stream =  knexInstance<User>('users').select('*').stream()
for await (const user of stream) {
    // console.log(user)
}

@kibertoad kibertoad merged commit 8858a63 into knex:master Mar 25, 2021
@kibertoad
Copy link
Collaborator

Thank you!

@kibertoad
Copy link
Collaborator

Released in 0.95.3.

@nguymin4
Copy link
Contributor Author

Thank you

monotykamary added a commit to monotykamary/knex that referenced this pull request Mar 26, 2021
Reverts a breaking type change to `stream` from
knex#4377. The `stream` method returns an
instance of `stream.Passthrough` or allows a callback of an instance
`stream.Passthrough` that returns a Promise as per documentation.
This is not interchangeable with AsyncIterable as Readable already
implements AsyncIterableIterator.
monotykamary added a commit to monotykamary/knex that referenced this pull request Mar 26, 2021
Adds upon knex#4377 by intersecting the
`stream.PassThrough` class to maintain the stream type.
monotykamary added a commit to monotykamary/knex that referenced this pull request Mar 26, 2021
Adds upon knex#4377 by intersecting the
`stream.PassThrough` class to maintain the stream type.
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.

None yet

2 participants