Skip to content

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 fastify@4.24.0

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
@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