Alternative to @nativeGetter


#1

I have a use case that seems to require @nativeGetter, but that annotation is deprecated.

I have this:

external class LoaderResults {
    @nativeGetter operator fun get(resource: String): LoaderResult?
}

interface LoaderResult {
    val name: String
    val error: Error?
}

What’s the recommended non-deprecated approach?