Closed Niels-Be closed 4 years ago
The JavaScript version makes a service interface and the TypeScript version makes a client interface. That should be explicit somewhere, probably in the name of the template.
The JavaScript version makes a service interface and the TypeScript version makes a client interface. That should be explicit somewhere, probably in the name of the template.
Right it should only generate client interfaces. Is there any use case for generating interfaces for a service?
Is there any use case for generating interfaces for a service?
Yeah, this was written to generate the boilerplate for mpris-service. It's more useful for clients, but it can easily do both because they use the same kinds of abstractions.
I did some updates and also added a recursive option to generate classes for an entire service at once. Each interface will be generated into its own file.
See node-dbus-network-manager for an example of a fully generated project.
:+1:
This will add an interface generator for client interfaces. It is similar to the existing generator but with several improvements.
Let me know if you want this in this project, otherwise I would create an separate project for this generator.
Usage:
Example: Generate a Typescript class that wraps all DBus calls into a high level interface.