Skip to content

Handle naming conflicts from internally defined subclass #116

Open
@mdechdee

Description

@mdechdee

I have a use case here where kotlin have internal subclass

@Serializable
data class A(val c: C){
    enum class C{
        one
    }
}

@Serializable
data class B(val c: C){
    enum class C {
        two
    }
}

@Serializable
data class Test(
    val a: A,
    val b: B
)

the generated ts definition of class Test is

export interface Test {
  a: A;
  b: B;
}

export interface A {
  c: C;
}

export interface B {
  c: C;
}

export enum C {
  one = "one",
}

export enum C {
  two = "two",
}

which has some naming conflicts on enum C.
Do we have a way to handle this? I see some unimplemented namespace, could it be used here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions