This is an excerpt from a Dukat-generated code: ``...
# javascript
n
This is an excerpt from a Dukat-generated code:
Copy code
external interface KeycloakConfig {
    var url: String?
        get() = definedExternally
        set(value) = definedExternally
    var realm: String
    var clientId: String
}
Could you explain why the explicit get()/set() is needed in case of nullable properties? Thanks.
t
It’s not required and can be removed
2
🙏 2
b
It just declares those values as optional so that you wouldn't have to implement them in a class explicitly
2
Simulates an equivalent to "prop: Type?" in Typescript (optional property)
So if you remove them, all implementations of the interface will have to provide explicit implementations of those properties.
2
🙏 2