fastify / fastify-websocket

basic websocket support for fastify
MIT License
394 stars 72 forks source link

fix a typescript generic type error #280

Closed XHFkindergarten closed 8 months ago

XHFkindergarten commented 9 months ago

Prerequisites

Fastify version

x

Plugin version

x

Node.js version

x

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

x

Description

I'm trying to practice a tutorial of Platformatic,and in this template, compilerOptions.skipLibCheck is not on. so it exposed a problem of @fastify/websocket。

image

and typescript should output: Generic type 'RouteShorthandMethod<RawServer, RawRequest, RawReply, TypeProvider>' requires between 0 and 4 type arguments.

i think the Logger generic parameter is useless and should be removed.

Steps to Reproduce

https://docs.platformatic.dev/docs/getting-started/movie-quotes-app-tutorial

Expected Behavior

No response