node-binance-api icon indicating copy to clipboard operation
node-binance-api copied to clipboard

Typescript build error

Open JeffreyTheTukkr opened this issue 4 years ago • 2 comments

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! 🎉

JeffreyTheTukkr avatar Dec 30 '21 17:12 JeffreyTheTukkr

any news?

achilovbakhrom avatar Jan 23 '22 18:01 achilovbakhrom

I have too, same problem.

matte0080 avatar Nov 20 '22 15:11 matte0080