Open bwajtr opened 1 year ago
Thanks for the suggestion. As far as I remember, Java records are not supported in the default source-based parser, therefore using records as of today requires enabling the hillaEngine
feature-flag that enables the new multi-module bytecode parser.
Let us consider suggesting records after making the multi-module parser stable.
In the following chapter: https://hilla.dev/docs/lit/start/in-depth/type-safe-server-access-with-endpoints/#creating-the-crm-endpoint
The part about the Endpoint result type (definition of CrmData.java) suggests the following:
I think it's worth noting in this part that if the developer is using Java 17 (which will be the minimum version for Hilla 2, right?), using the Java "record" as the return type from the endpoint would be another working option