I try to reduce my codebase by using a KMM library compiled for Jvm, Android and Javascript.
The simplest code in Kotlin:
@JsExport
actual interface DataTransferObject {
actual val _type: String
get() = "temp"
}
Produces the following code in Javascript:
interface DataTransferObject {
readonly _type: string;
readonly __doNotUseOrImplementIt: {
readonly "info.cotique.rest.commons.DataTransferObject": unique symbol;
};
}
What is __doNotUseOrImplementIt? This name says that I am not to use the interface. Why so? Is there a way to make Kotlin stop adding such fields?
UPDATE One more example in Kotlin:
@JsExport
interface IdDTO<I: Comparable<I>>: DataTransferObject {
var id: I?
}
Produces in JavaScript
interface IdDTO<I extends info.cotique.rest.commons.Comparable<I>> extends info.cotique.rest.commons.DataTransferObject {
id: Nullable<I>;
readonly _type: string;
readonly __doNotUseOrImplementIt: {
readonly "info.cotique.rest.commons.IdDTO": unique symbol;
} & info.cotique.rest.commons.DataTransferObject["__doNotUseOrImplementIt"];
}