Closed tonybentley closed 1 year ago
I'm all for it! Can you lend a hand?
There's actually a start for this already: https://github.com/SignalK/signalk-server/tree/master/packages/server-api is the module @signalk/server-api
.
There's just a minimal Plugin signature https://github.com/SignalK/signalk-server/blob/master/packages/server-api/src/index.ts#L26-L57.
We should move things around so that plugins.ts uses all this https://github.com/SignalK/signalk-server/blob/master/packages/server-api/src/index.ts#L26-L57 from the server-api module and at least most of the stuff here https://github.com/SignalK/signalk-server/blob/master/packages/server-api/src/index.ts#L26-L57 is moved to server-api.
The interface required for developing a plugin in typescript is buried in the signalk-server package.
Steps to reproduce:
Create a separate plugin GitHub project, and implement typescript. When exporting the default method as specified in the plugin documentation, include the app parameter and interface.
Solution: abstract public interfaces into a type definitions