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

fix(types): websocketPlugin is not an existing variable #269

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

Yovach
Copy link
Contributor

@Yovach Yovach commented Oct 14, 2023

This PR fixes a mistake in types.
The named exports websocketPlugin doesn't exist in the code and you can't use it

Until this PR is merged, you can do the following :

fastify-websocket.d.ts

import type websocketPlugin from "@fastify/websocket";

declare module "@fastify/websocket" {
  export const fastifyWebsocket: typeof websocketPlugin;
}

Checklist

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 14, 2023

image

Shame!

thank you.

@mcollina
Copy link
Member

Can you add a test using tsd to prevent this for regressing?

@Yovach
Copy link
Contributor Author

Yovach commented Oct 16, 2023

Can you add a test using tsd to prevent this for regressing?

I added a test for named-import but tests seems broken in [email protected]

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 16, 2023

Other typings fails are unrelated to this PR.

@Uzlopak Uzlopak merged commit 2af90ac into fastify:master Oct 16, 2023
4 of 15 checks passed
@Yovach Yovach deleted the fix/types-export-websocket-plugin branch October 16, 2023 12:27
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.

3 participants