PixiJS (or rather, Resource Loader), returns a JS object shaped like this in the callback of the load function:
{
"resource-you-asked-for.png": {
url: "foo.png",
error: <optional error>,
data: <binary data>
},
"second-resource.png": { ... }
}
My question is...how do I model this in Kotlin.js? I can't just say this is a Map<String, LoaderResult>
-- then Kotlin will try to use get
(a mangled get
actually) to index into it. And I can't subclass dynamic
obviously.
Suggestions?