Skip to content

Conversation

@farfromrefug
Copy link
Contributor

@farfromrefug farfromrefug commented Oct 25, 2025

This PR add many things which improve typings generation:

  • improved PR Updates to tackle Kotlin compatibility issues (#84) #85, fixing bugs and adding more edge cases
  • handle kotlin parameters without return paramter names with forbidden chars
  • ensure replaceGenericsInText does not remove > chars far already any types
  • better detection of open/close namespace to prevent unclosed namespaces
  • some inner namespaces where not correctly filled/exported
  • kotlin Companion is now a namespace making static functions being reported correctly
  • add eslint rules at the top to prevent vscode errors
  • constant values real value is now exported as jsdoc. Using direct values was failing in some cases and vscode was reporting errors

Some commits are listed here while already merged

farfromrefug and others added 25 commits March 3, 2022 21:05
# Conflicts:
#	dts-generator/gradle/wrapper/gradle-wrapper.properties
#	dts-generator/src/main/java/com/telerik/dts/DtsApi.java
# Conflicts:
#	dts-generator/src/main/java/com/telerik/dts/DtsApi.java
# Conflicts:
#	dts-generator/src/main/java/com/telerik/dts/DtsApi.java
* handle kotlin parameters without return paramter names with forbidden chars
* ensure replaceGenericsInText does not remove > chars far already any types
* better detection of open/close namespace to prevent unclosed namespaces
* some inner namespaces where not correctly filled/exported
@dangrima90
Copy link

dangrima90 commented Oct 26, 2025

@farfromrefug I tested the PR and from my end it's looking good. It seems that you encountered more edge cases than me!

Some points from my end:

  • The constant values fix you did was something I did notice and from my tests but in my case it looked like when placing the .d.ts file in a nativescript project those VS Code warnings went away. Still I think your solution makes more sense as TS was complaining about the constant values.
  • I did see the change from module to namespace and did a bit of research just to make sure it won't affect anything. From what I checked the typings generated here should export namespace and not module as these typings are not imported (therefore they aren't a module).

@dangrima90
Copy link

dangrima90 commented Nov 12, 2025

Hi @farfromrefug, I was testing again today and something I'd like to highlight is that names are a bit more cryptic now, not sure if it's the intended behaviour or not:

image image

What you see in red is what was generated with the changes I had pushed, green the changes with this branch. If it's intended behaviour I guess not a problem. Just highlighting it just in case.

One more inconsistency, double namespace.. which I'm still checking whether it's a generation issue or not:
image
image

@farfromrefug
Copy link
Contributor Author

@dangrima90 seems like there is a bug there. What lib are you testing with? i need to reproduce

@dangrima90
Copy link

dangrima90 commented Nov 12, 2025

@farfromrefug this is the SDKs I'm testing https://github.com/orgs/Mitek-Systems/packages?repo_name=MiSnap-Android. I think you can download the packages from the link I sent. Else you might need to set up a PAT to download the AAR files: https://github.com/Mitek-Systems/MiSnap-Android?tab=readme-ov-file#how-to-integrate-the-misnap-sdk-using-maven.

For example, the screenshot above showing DocumentSession is via com.miteksystems.misnap.workflow.

@farfromrefug
Copy link
Contributor Author

@dangrima90 i dont have credentials for that file. can you share the aar directly by mail ( dev at akylas dot fr)

@dangrima90
Copy link

@farfromrefug unfortunately I'm being blocked from attaching the aar file as an attachment. Just in case you can download the aar file from here: https://github.com/Mitek-Systems/MiSnap-Android/packages/1577915.

Screen.Recording.2025-11-13.at.08.39.50.mov

Does this help, or you're still not able to access it?

@farfromrefug
Copy link
Contributor Author

@dangrima90 i downloaded it thanks. But i dont see broken part of MiSnapDocumentClassifier. Is that another aar?

@dangrima90
Copy link

dangrima90 commented Nov 13, 2025

Hi again @farfromrefug, sorry I might have passed a wrong version. Somehow the latest version is listed as 5.6.1 which is an older version than I was testing with. Do you mind trying the core SDK please?

This is the same version I'm testing with 5.8.1: https://github.com/Mitek-Systems/MiSnap-Android/packages/1577896?version=5.8.1.

Here's an example of the changes (same as before, red = my branch, green = your updates 🙂):
image

For reference I've attached the typings file for the core SDK I had generated so that you can compare: misnap-core.d.ts.

Sorry for all the back and forth, if you need me to send more samples let me know, it's not a problem.

@farfromrefug
Copy link
Contributor Author

@dangrima90 both should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants