Generated nested generic field in DTO looses class type

Hello.
This is DTO class:

public class DTO{
List<Pair<Integer, FullQueueStat>> q
}

This is how TS DTO generated:

interface DTO {
q?: Array<Pair_1<number | undefined> | undefined>;
}

So, type FullQueueStat is lost.
And the problem is - DTOModel throws en error:

Type 'ArrayModel<PairModel<Pair<unknown, unknown>>>' is not assignable to type 'ChildModel<T, "q">'.
  Types of property '['constructor']' are incompatible.
    Type '(abstract new (parent: ModelParent, key: string | number | symbol, optional: boolean, options?: ModelOptions<Pair<unknown, unknown>[]> | undefined) => AbstractModel<Pair<unknown, unknown>[]>) & { ...; }' is not assignable to type '(abstract new (parent: ModelParent, key: string | number | symbol, optional: boolean, options?: ModelOptions<NonNullable<T["q"]>> | undefined) => AbstractModel<...>) & { ...; }'.
      Types of parameters 'options' and 'options' are incompatible.
        Type 'ModelOptions<NonNullable<T["q"]>> | undefined' is not assignable to type 'ModelOptions<Pair<unknown, unknown>[]> | undefined'.
          Type 'ModelOptions<NonNullable<T["q"]>>' is not assignable to type 'ModelOptions<Pair<unknown, unknown>[]>'.
            Type 'NonNullable<T["q"]>' is not assignable to type 'Pair<unknown, unknown>[]'.
              Type 'Pair<number | undefined, unknown> | undefined' is not assignable to type 'Pair<unknown, unknown>'.
                Type 'undefined' is not assignable to type 'Pair<unknown, unknown>'.

Is it possible to fix it without creating extra not generic DTO?
Hilla 24.7.5

I tried a similar code on 24.8.0.rc1 and it generated the interface correctly. However, the generated model has an error indeed.

Can you try to replicate the DTO bug on an example that we can reproduce? In that case, please open an issue to allow us to work on that.

Using Map<Integer, FullQueueStat>> and upgrading to 24.8.0.rc1 helped

For users stumbling upon this thread, I propose another workaround: use records instead of tuple-like util classes.
See Generated nested generic field in DTO looses class type and model file throws an exception · Issue #3619 · vaadin/hilla · GitHub