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

Websocket subscribe() function claims parameter has a 200 prop #116

Open
boredland opened this issue Jul 26, 2024 · 1 comment
Open

Websocket subscribe() function claims parameter has a 200 prop #116

boredland opened this issue Jul 26, 2024 · 1 comment

Comments

@boredland
Copy link

... but it doesn't have it.

I am following the basic example for websockets on all the current versions

        "@elysiajs/eden": "^1.1.2",
        "elysia": "^1.1.4",

This part is a bit strange:

chat.subscribe((message) => {
    console.log('got', message)
})

The typings for message suggest this is

Treaty.OnMessage<{
    200: string;
}>

This directs me to a response type in Elysias UnwrapRoute, that claims to have a property data with a property 200 inside:

image

This 200-prop doesn't exist. What am I missing, or is that a bug?

@Lashji
Copy link

Lashji commented Aug 1, 2024

Hmmm, I've been facing this issue too. Looking forward for some insight.

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