Closed derchirurg closed 6 years ago
Can you give some more details. How do you run the dts-generator, what arguments are you passing? You will need to look at the complex typings generation. The thing is that there are classes extending native classes, so you need to pass both Super class jars(-super) and Input generics(-input-generics) so that the tool will know what methods have the super class to add them in the inheritor. The easiest way will be to pass the following additional parameters to the dts generator:
java -jar dts-generator/build/libs/dts-generator.jar -input dts-generator/jar-files/pdfbox-android.aar -input-generics libs/generics.txt -super ${ANDROID_HOME}/platforms/android-17/android.jar
Using that approach I've generated the following typings file pdfbox.android.d.ts.zip (note that it needs tns-platform-declarations as it references the android typings from there).
We've improved the ignored namespaces functionality not to generate classes from an ignored namespace and com.tom_roush.pdfbox.pdmodel.common.function
is added to the list of ignored ones as we cannot generate a working typings for it.
I hope this helps! Please let me know if this works for you!
This seems to work. I can run the demo with the compiled jar. Thank you very much!
@vtrifonov This seems to work for me. Thank you very much.
I'm trying to write a plugin for PDFBox-Android. I am running the tool with a slightly modified jar (because namespace functions is invalid).
When I compile my typescript files, everything is fine. But when I run the plugin (with npm run demo.android), I am getting the following errors:
Can someone tell me how to fix them? I really need the typings.