Open HawkSK opened 11 months ago
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>
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?>)
same here
Primitive nullable Kotlin types are ignored when they are used in a generic type in inheritance.
Given
generates syntactically incorrect TypeScript
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: