Facing Issue after updating Hilla version from 2.2.0 - 2.3.2, error in the generated files.

What is the Issue here, I just changed the hilla version, this error is come in the generated folder’s files.
Is there any solution for this one??

.

There was a bug, it was just fixed but you’ll need to wait for the next release TypeScript error in the generated model of a Java generic property · Issue #1612 · vaadin/hilla · GitHub

Okay, thanks

This seems to be related: https://github.com/vaadin/hilla/issues/1650 I get the same error message from a simple Map without generics:

EndpointClass {
  List<DataRecord> getDatarecords();
}

And the DataRecord class contains:

private Map<String, UUID> map;

The problem I described earlier is actually fixed but I still get the following error in 2.3.3:

ERROR(TypeScript)  Type 'ObjectModel<NonNullable<T["optionFieldValues"]>>' is not assignable to type 'ObjectModel<Record<string, readonly string[]>>'.
  Type 'NonNullable<T["optionFieldValues"]>' is not assignable to type 'Record<string, readonly string[]>'.
    'string' index signatures are incompatible.
      Type '(string | undefined)[] | undefined' is not assignable to type 'readonly string[]'.
        Type 'undefined' is not assignable to type 'readonly string[]'.

Where the EndPoint returns List and the DataRecord class contains:

private Map<UUID, List<UUID>> optionFieldValues;

This setup worked in 2.2.2 but fails in 2.3.3

Can you please create an issue for us on GitHub so we can take a look?

https://github.com/random9067047/hilla233EndpointGenericsError

Thanks! Could you also make an issue here https://github.com/vaadin/hilla/issues, linking to that and providing relevant info. Issues that are only in Discord risk getting lost :man_bowing:

Ok, created as https://github.com/vaadin/hilla/issues/1740

Fixed in 2.5.1