Kotlin / dukat

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

Dukat generates External type extends non-external type #346

Open abrooksv opened 4 years ago

abrooksv commented 4 years ago

Error: External type extends non-external type

Snippet:

external interface Headers : Map<String, String> {
    fun withHeader(headerName: String, headerValue: String): Headers
    fun withoutHeader(headerName: String): Headers
}

Dependency:

implementation(npm("@aws-sdk/types", "1.0.0-gamma.3"))

TypeScript: https://github.com/aws/aws-sdk-js-v3/blob/master/packages/types/src/http.ts#L5

Dukat version: 0.5.7

utybo commented 3 years ago

Can repro by using the JS MSAL library, getting

External type extends non-external type

due to

external open class ClientAuthError(errorCode: String, errorMessage: String = definedExternally) : AuthError
// AuthError:
typealias AuthError = Error

The Error there is from the Kotlin stdlib