Hello everyone! I am making Kotlin definitions for...
# javascript
p
Hello everyone! I am making Kotlin definitions for a JS library using type definitions from Typescript and I've encountered this syntax: (typescript)
Copy code
_showAuthDialog({ nonInteractive, error, canCancel, onTryAgain }?: AuthDialogParams): void;
What would be the best way to write Kotlin definition for that function? Just to replace argument name with any valid string or..? Just in case, AuthDialogParams definition:
Copy code
interface AuthDialogParams {
    nonInteractive?: boolean;
    error?: Error;
    canCancel?: boolean;
    onTryAgain?: () => Promise<void>;
}
Thanks in advance!
n
You should be able to name that argument anything you'd like. The fact that that parameter is destructured is only relevant to the JavaScript function body, not to your Kotlin type definitions.
🙏 1
1