dukat icon indicating copy to clipboard operation
dukat copied to clipboard

Dukat generates External type extends non-external type

Open abrooksv opened this issue 4 years ago • 1 comments

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

abrooksv avatar Jul 28 '20 17:07 abrooksv

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

utybo avatar Jan 20 '21 14:01 utybo