quiro
05/14/2024, 11:03 AMinterface Cat {
name: string
}
but as far as I can see, whenever I generate an interface an additional __doNotUseOrImplementIt
is added to it. Is there any way to work around this limitation? All I want is for consumers to be able to call a function sayHello(cat: Cat)
easily from TypeScript (eg sayHello({ name: 'George' })
Artem Kobzar
05/14/2024, 11:15 AMis
checks (so, we need to add meta information), they can have default implementations of methods/accessors, and they are nominal (if two interfaces have the same members, they are not equal) in the same time TS interfaces don't exist in runtime at all and have structural typing (if two interfaces have the same members they are equal)Artem Kobzar
05/14/2024, 11:16 AMquiro
05/14/2024, 11:23 AMEdoardo Luppi
05/14/2024, 12:10 PM@JsExport
supported only for external interface
, or also for external class
?Artem Kobzar
05/14/2024, 12:16 PMEdoardo Luppi
05/14/2024, 12:17 PMEdoardo Luppi
05/14/2024, 12:29 PMquiro
05/15/2024, 7:16 AMModifier 'external' is not applicable to 'class'
for the following code:
external interface A {
val something: String
}
Artem Kobzar
05/15/2024, 8:37 AMEdoardo Luppi
05/15/2024, 8:46 AM