- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10.1k
 
Closed
Labels
Milestone
Description
Describe the bug
Types for socket.io-parser and engine.io-parser are not installed
To Reproduce
Socket.IO server version: 4.5.4
When compile with typescript it throws these errors:
TS7016: Could not find a declaration file for module 'engine.io-parser'. '.../node_modules/engine.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/engine.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'engine.io-parser';`
3 import * as parser from "engine.io-parser";
                          ~~~~~~~~~~~~~~~~~~
TS7016: Could not find a declaration file for module 'engine.io-parser'. '.../node_modules/engine.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/engine.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'engine.io-parser';`
4 import { Packet } from "engine.io-parser";
                         ~~~~~~~~~~~~~~~~~~
TS7016: Could not find a declaration file for module 'socket.io-parser'. '.../node_modules/socket.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/socket.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'socket.io-parser';`
2 import { Packet } from "socket.io-parser";
                         ~~~~~~~~~~~~~~~~~~
TS7016: Could not find a declaration file for module 'socket.io-parser'. '.../node_modules/socket.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/socket.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'socket.io-parser';`
10 import * as parser from "socket.io-parser";
                           ~~~~~~~~~~~~~~~~~~
TS7016: Could not find a declaration file for module 'socket.io-parser'. '.../node_modules/socket.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/socket.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'socket.io-parser';`
11 import type { Encoder } from "socket.io-parser";
                                ~~~~~~~~~~~~~~~~~~
TS7016: Could not find a declaration file for module 'socket.io-parser'. '.../node_modules/socket.io-parser/build/cjs/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/socket.io-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'socket.io-parser';`
3 import { Packet } from "socket.io-parser";
                         ~~~~~~~~~~~~~~~~~~
Did I do something wrong?
Do I have to install the types manually?
FoxxMD