Bernhard
06/07/2024, 8:34 AMclass Base {
sayHo() {
console.log("ho")
}
}
function Mixin(base) {
return class New extends base {
sayHi() {
console.log("hi")
}
}
}
class Child extends Mixin(Base) {
}
const x = new Child()
x.sayHi()
x.sayHo()
Edoardo Luppi
06/07/2024, 8:48 AMChild
is extending Base
.
external class Base {
fun sayHo()
}
external class Child : Base {
fun sayHi()
}
I don't think the function has to be considered here.Bernhard
06/07/2024, 8:48 AMEdoardo Luppi
06/07/2024, 8:51 AMBernhard
06/07/2024, 8:52 AMEdoardo Luppi
06/07/2024, 8:52 AMMixin
function from Kotlin, that's itBernhard
06/07/2024, 8:52 AMBernhard
06/07/2024, 8:52 AMclass MyApplication extends HandlebarsApplicationMixin(DocumentSheetV2) {
Bernhard
06/07/2024, 8:53 AMBernhard
06/07/2024, 8:53 AMEdoardo Luppi
06/07/2024, 8:54 AMEdoardo Luppi
06/07/2024, 9:10 AM@JsName("HandlebarsApplicationMixin(DocumentSheetV2)")
@Suppress("NAME_CONTAINS_ILLEGAL_CHARS")
public open external class HandlebarsApplicationMixin
However, without a compiler plugin, the inputted type can't be dynamicEdoardo Luppi
06/07/2024, 9:13 AMNAME_CONTAINS_ILLEGAL_CHARS
suppressions in K2Bernhard
06/07/2024, 9:14 AMEdoardo Luppi
06/07/2024, 9:23 AMDocumentSheetV2
.
If it doesn't exist in the global scope, the code will fail at runtimeBernhard
06/07/2024, 9:31 AMEdoardo Luppi
06/07/2024, 10:01 AM