peerjs-server icon indicating copy to clipboard operation
peerjs-server copied to clipboard

@types packages as production dependencies?

Open vostrnad opened this issue 4 years ago • 1 comments

I'm having an issue:

peerjs-server lists a few DefinitelyTyped packages as production dependencies:

@types/cors
@types/express
@types/ws

This means that these packages are installed when peerjs-server or any package that depends on it is installed

I have a suggestion:

Move them from dependencies to devDependencies in package.json.

vostrnad avatar Jul 23 '20 00:07 vostrnad

@vostrnad I have a question: We have index.d.ts which uses @types/ws and @types/express. Is it safe to move these packages to devDeps? AFAIK if the library exports some types, it should be in deps.

afrokick avatar Nov 24 '20 08:11 afrokick

Types should go to dependencies, see the typescript documentation

jonasgloning avatar Feb 07 '23 12:02 jonasgloning