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

Vanilla-Client: Websocket subscriptions input types are wrongly infered #227

Open
v-morlock opened this issue Sep 22, 2023 · 0 comments
Open
Milestone

Comments

@v-morlock
Copy link

Hi,

When i defined subscriptions as follows,

        .subscription("...", |t| {
            t(move |_, _: ()| {
                async_stream::stream! {
...
                }
            })
        })

the generated bindings.ts looks like that:

  subscriptions:
    | { key: "on_document"; input: never; result: DocumentResult };

However, Typescript wants me to pass [] as an argument when starting the subscription using the vanilla client, which fails. When passing undefined, everything works, however typescript resports an error.

@Brendonovich Brendonovich added this to the 1.0.0 milestone Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants