websockets / ws

Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js
MIT License
21.33k stars 2.3k forks source link

Unhappy TypeScript when using compilerOptions: module: Node16 || NodeNext #2204

Closed DanNisenson closed 4 months ago

DanNisenson commented 4 months ago

Is there an existing issue for this?

Description

If tsconfig.json is set as below, subsequent error is thrown.

{
    "compilerOptions": {
        "module": "NodeNext",
}

Could not find a declaration file for module 'ws'. 'xxx/xxx/xxx/node_modules/ws/index.js' implicitly has an 'any' type.

@types/ws are installed in the project

ws version

8.16.0

Node.js Version

20.9.0

System

OS: macOS 12.5.1 CPU: (8) arm64 Apple M1 Memory: 61.89 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh

Expected result

No response

Actual result

No response

Attachments

No response

lpinca commented 4 months ago

There are no TypeScript type definitions in this repository. You might want to open an issue here https://github.com/DefinitelyTyped/DefinitelyTyped.