Open Place1 opened 7 years ago
ndts
doesn't look at the original source code, but instead type information exposed during compilation by using templates. The compiled code has no access to the original variable names. The only solution would be to manually add annotations inside the NBIND_CLASS
block using some new syntax.
A new tool to extract both variable names and JSDoc style comments from C++ header and source files would be nice and probably doable using clang libraries.
hmm, so no easy solution. i'm currently hacking on https://github.com/Place1/react-native-gtk so I don't have time. Otherwise I'd love to look at spending time on a PR :D
Currently it looks like ndts generates names for method params:
e.g.
The original c++ method was
set_size_request(int width, int height)
. Is it possible for ndts to use the same identifier nameswidth
andheight
?I plan to use the automatically generated typescript definitions to create some basic documentation site so having the actual identifier names would make a big difference to the usefulness of such a site.
Similarly, editor intelisense often shows the identifier names. In this example (a common one) the identifier names are very important because without them people won't know the order (width, height or height, width)???