mikuso / ocpp-rpc

A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protocols.
MIT License
94 stars 28 forks source link

[feat] adding typescript to the package #71

Closed rohittiwari-dev closed 7 months ago

rohittiwari-dev commented 7 months ago

Add : Typings for typescript support without changing original files Test : Passes all 138 test cases with mocha

Note : only added support for using this package in typescript if required changes can be done each changes has been in [filename].d.ts

mikuso commented 7 months ago

Thanks for the contribution.

I've been hesitant to add typescript support so far (for reasons discussed in other threads), but I think I'd be happy to merge this since it doesn't try to solve the tricky problem of type safety with OCPP-specific calls.

Would you have time to label the private class members first? Any property or method beginning with a _ ought to be labelled as private. If you don't have time, let me know and I'll find time to do it at some point.

Thanks again.

rohittiwari-dev commented 7 months ago

thanks for the consideration, i will push the update today itself after adding private access identifier to all data-members which starts with _ ,

rohittiwari-dev commented 7 months ago

Hi @mikuso, I have added labeling of access identifiers to all class member starts with '_' as required either private or protected as needed the server passes all tests with mocha. Please consider merging this.

Thanks once again, and thanks to Sunday national holiday in 'India' for the time.

mikuso commented 7 months ago

Thanks for the contribution. Version 2.1.0 now published in npm.