Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing nullable Kotlin primitive generic type in inheritance #1031

Open
HawkSK opened this issue Oct 18, 2023 · 1 comment
Open

Missing nullable Kotlin primitive generic type in inheritance #1031

HawkSK opened this issue Oct 18, 2023 · 1 comment

Comments

@HawkSK
Copy link

HawkSK commented Oct 18, 2023

Primitive nullable Kotlin types are ignored when they are used in a generic type in inheritance.

Given

interface IReference<T> {
    val id: T
}

data class SomeDto(
    override val id: Int?
) : IReference<Int?>

generates syntactically incorrect TypeScript

export interface SomeDtoGenerated extends IReferenceGenerated<number> {
    id: number | null;
}

export interface IReferenceGenerated<T> {
    id: T;
}

whereas it should be SomeDtoGenerated extends IReferenceGenerated<number | nullable>

Plugin version: 3.1.1185


Note: Properties/fields do not have this issue. F.e. the following works as expected:

data class Dummy(val dummyField: IReference<Int?>)
@klaus7
Copy link

klaus7 commented Feb 1, 2024

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants