altangent / ccxws

WebSocket client for 38 cryptocurrency exchanges
MIT License
618 stars 186 forks source link

Typescript Definitions FIle #294

Closed mrfusi0n closed 3 years ago

mrfusi0n commented 3 years ago

I'm really excited to see this project is now done in Typescript! However, I still can't use it natively in my Typescript project because it can't find a types definition file. I'm not an expert on creating Typescript libraries but I see you are creating type definitions ("definition": true in tsconfig.json). But, by default, I think they go into your "dist" folder which you are ignoring in git. If I'm off on any of this, please disregard! FYI, the error I'm seeing in my project after installing ccxws is, "Could not find a declaration file for module 'ccxws'." I think I can still manually install a local d.ts file to define the types but I was still hoping it could be detected automatically as part of your package. Thanks for all your hard work!!!

VincentdeWit94 commented 3 years ago

If you want to use this one with Typescript, you could use the latest from Github. Typescript has been merged recently, but is not yet released to the NPM registry.

yarn add git+https://github.com/altangent/ccxws.git