jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.58k stars 768 forks source link

Typescript build error #784

Open JeffreyTheTukkr opened 2 years ago

JeffreyTheTukkr commented 2 years ago

When trying to build my NodeJS project with Typescript, I receive the following error. Using NodeJS v16.13.1 with npm v8.1.2, and not experiencing this issue on development. Only difference between the two is using tsc for building and nodemon for development.

node_modules/node-binance-api/node-binance-api.d.ts:1367:81 - error TS2552: Cannot find name 'WebSocket'. Did you mean 'IWebsockets'?

1367         futuresSubscribeSingle(url: string, callback: _callback, params?: any): WebSocket;
                                                                                     ~~~~~~~~~

node_modules/node-binance-api/node-binance-api.d.ts:1377:80 - error TS2552: Cannot find name 'WebSocket'. Did you mean 'IWebsockets'?

1377         futuresSubscribe(streams: string, callback: _callback, params?: any ): WebSocket;
                                                                                    ~~~~~~~~~

node_modules/node-binance-api/node-binance-api.d.ts:1488:80 - error TS2552: Cannot find name 'WebSocket'. Did you mean 'IWebsockets'?

1488         deliverySubscribe(streams: string, callback: _callback, params?: any): WebSocket;
                                                                                    ~~~~~~~~~

node_modules/node-binance-api/node-binance-api.d.ts:1503:9 - error TS7010: 'deliveryTerminate', which lacks return-type annotation, implicitly has an 'any' return type.

1503         deliveryTerminate(endpoint: string);
             ~~~~~~~~~~~~~~~~~

Happy new year! 🎉

achilovbakhrom commented 2 years ago

any news?

matte0080 commented 1 year ago

I have too, same problem.