Closed JSMonk closed 2 years ago
Currently, we just ignore any construct signatures and as a result, have a problem with so common declarations like this:
declare interface InstanceApi { foo(): void } declare interface StaticApi { bar(): void new(): InstanceApi } declare var SomeClass: StaticApi /* ... */ declare class AnotherClass extends SomeClass {}
I proposed to analyze interfaces, classes, and type aliases on a construct signature existence and generate classes like this:
external interface InstanceApi { fun foo() } external interface StaticApi { fun bar() } external class SomeClass: InstanceApi { companion object : StaticApi } /* ... */ external class AnotherClass : SomeClass
https://github.com/Kotlin/dukat/issues/404
Oh, sorry. Seems like I forgot to add it to the git index.
Summary
Currently, we just ignore any construct signatures and as a result, have a problem with so common declarations like this:
I proposed to analyze interfaces, classes, and type aliases on a construct signature existence and generate classes like this:
Related Issue
https://github.com/Kotlin/dukat/issues/404