Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 44 forks source link

Conflicting declarations generated in lib.es2018.asynciterable.module_dukat.kt #402

Closed Vampire closed 3 years ago

Vampire commented 3 years ago

Something in the combination used at https://github.com/Vampire/setup-wsl causes the file lib.es2018.asynciterable.module_dukat.kt to be generated. Inside you get:

    val `return`: ((value: TReturn) -> Promise<dynamic /* IteratorYieldResult<T> | IteratorReturnResult<TReturn> */>)?
        get() = definedExternally
    val `return`: ((value: PromiseLike<TReturn>) -> Promise<dynamic /* IteratorYieldResult<T> | IteratorReturnResult<TReturn> */>)?
        get() = definedExternally

which are conflicting declarations that cannot compile. As I don't use it directly anyway my solution was to delete one and make the other have dynamic instead of TReturn or PromiseLike<TReturn> but that is no proper fix of course. I think it comes from this line:

    return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;

from the file build/js/node_modules/dukat/d.ts.libs/lib.es2018.asynciterable.d.ts.

trilis commented 3 years ago

Hi! This look similar to #344, so #390 should fix this as well.

Vampire commented 3 years ago

Nice, thx