typescript-generator
typescript-generator copied to clipboard
Fix support for nullability in Kotlin interfaces and abstract classes
When encountering a Kotlin property the type parser attempts to find the backing java field: https://github.com/vojtechhabarta/typescript-generator/blob/7a33aa0d8b4ce9e0a7d6626e65195b4c995b2871/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/parser/TypeParser.java#L193
However, in interfaces and abstract classes a property might not have a Java field. In this case the parser falls back to the Java type parser which doesn't know about Kotlin nullability: https://github.com/vojtechhabarta/typescript-generator/blob/7a33aa0d8b4ce9e0a7d6626e65195b4c995b2871/typescript-generator-core/src/main/java/cz/habarta/typescript/generator/parser/TypeParser.java#L200
This PR fixes #708 by changing the behavior to directly use the return type of the Kotlin property.
Any idea when this will get merged?
Hello, Our team are waiting for this fix as well.
Our team is also waiting for this fix, would be cool to merge it.
@vojtechhabarta Is there anything I can do to support this PR getting merged?
If you have any suggestions about changes I have to make to get this in a mergeable state I would gladly invest some time.
@mwalser, @hho thank you for this PR.