Closed shubhamsinghshubham777 closed 1 year ago
I believe problem is here
executeCommand: (name: string, ...args: any[] | undefined[]) => void;
Type any[] | undefined[]
is probably rendered to Any
, because Kotlin does not support unions.
In Kotlin for such declaration:
function (...args: string[])
Karakum should generate something like this
fun (vararg args: String)
So I need to extract generic type from args
but I can not extract generic type from Any.
To move forward you can write custom plugin to handle this case.
What behavior do you expect in such situation? Somthing like that:
fun executeCommand: (name: string, vararg args: Any) => void;
What behavior do you expect in such situation? Somthing like that:
fun executeCommand: (name: string, vararg args: Any) => void;
Yes, I would want something like this only ✅
Fixed in 070eb337ec2242264720160d2a0a0d9642088dc7
Hi there I am trying to use this plugin to generate Kotlin declarations for https://www.npmjs.com/package/@jitsi/react-sdk
I followed the readme and this is how my
karakum.config.json
file looks like:But when I try running the following command:
npx karakum --config karakum.config.json
, I get the following error stack:I'm not sure how to proceed forward. Any help would be appreciated ⭐
P.S. this his how my
convertNameSpace.js
file looks like: