-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Interface Generator #52
Conversation
This is a rewrite of the interface generator. It will enhance its capabilities with cusomizeable templates, allow generation directly from live dbus objects and adds example templates for javascript-classes, typescript-classes and typescript-dts interfaces.
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. |
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. |
👍 |
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.