-
Notifications
You must be signed in to change notification settings - Fork 98
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
Added more specific typing and description LayoutOptions #195
base: master
Are you sure you want to change the base?
Conversation
Added the file i used to generate typing
I don't know, if there is a possability, that the interface has extra properties. I left a "[key:string]: any" if the interface isn't complete. It it isn't needed you can remove them as well. |
I tried the typings and some need to have the elk. at the beginning. |
Sorry for the continuus changes. I now used https://www.eclipse.org/elk/reference.html to add the Enum Types as Union Strings. |
I added al Variants of the EnumSet<...> as String Union Representation. @uruuru @soerendomroes Any Preferences from you guys? |
How do your changes integrate with the current elkjs build? |
The Problem with generating the types in the continuous integrating is that elk.knownLayoutOptions() returns not the enum type, but only the value is of type enum. So it will be hard to map these Types together. Because not all types are string anymore, but "real" numbers or booleans Typescript will mark those as errors in deployment see action run on my repository. |
Sorry for the delay. |
The first thing I did when I decided elkjs was a great solution is I started manually adding the typings I was using. I think this PR would be a huge help towards improving developer experience! I hope it or one like it can get merged. |
I used the knownLayoutOptions() to generate more specific typings and description for LayoutOptions.
I tried to parse as much as possible but for example the enums aren't typed.
I don't know, if i placed the file i used to generate the typing at the right place. Feel free to change it. I also have the file in typescript, if that is wanted, but the code base is java-script, so i removed the type annotations.