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

Incorrect types for callback to Stream events #440

Open
jaredpereira opened this issue Mar 15, 2021 · 1 comment
Open

Incorrect types for callback to Stream events #440

jaredpereira opened this issue Mar 15, 2021 · 1 comment

Comments

@jaredpereira
Copy link

Hi! I'm trying out the new Streaming feature, and it seems like there are some inconsistencies between the types and the actual behavior.

The callback to stream events seems to be called with just the event object as the first argument, and the event object along with the transaction id and event type as the second argument.

listeners[i].call(null, event.event, event)

However, the types indicate that the first argument is the event type, followed by the transaction id, and finally the event object.

version: (
type: 'version',
txn: number,
event: {
action: 'create' | 'update' | 'delete'
document: object
diff: object
prev: object
}
) => void

@fireridlle
Copy link
Contributor

fireridlle commented Mar 16, 2021

Thank you for creating the issue. Types improving is on our road map. Meanwhile, I created a ticket for this bug and our project manager will prioritize it.
we track it internally as DRV-561

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

2 participants