feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.03k stars 748 forks source link

Unable to compile TypeScript with SocketIO #3130

Closed Tungtono closed 1 year ago

Tungtono commented 1 year ago

Steps to reproduce

I'm trying out Feathers 4.5.15, app generated from feathers CLI with Typescript. Just added @feathersjs/socketio, also 4.5.15 and configured with app.configure(socketio());, but unable to compile with the type error:

[ERROR] 16:15:18 ⨯ Unable to compile TypeScript:
src/app.ts(49,15): error TS2345: Argument of type '(app: Application<any, any>) => void' is not assignable to parameter of type '(this: Application, app: Application) => void'.
  Types of parameters 'app' and 'app' are incompatible.
    Type 'Application' is not assignable to type 'Application<any, any>'.

am I using the right version of @feathersjs/socketio or what should I do with this??

Expected behavior

Tell us what should happen

Actual behavior

Tell us what happens instead

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 4.5.15

NodeJS version: 16.0.0

Operating System:

Browser Version:

React Native Version:

Module Loader: