You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't have any particular plans, but it's admittedly a pain point.
One possible solution is anonymous classes, like I mentioned in that comment. We're also thinking about whether we'd want to introduce structural types, which might provide another solution for pain points like this.
Trying to type nested objects seems unnecessarily verbose.
According to the documentation, typing objects is possible via classes or modules.
In order to type an object with nested properties, at least two class declarations are needed.
Compared to e.g. TypeScript interfaces or types and other constructs to define types inline this seems a little verbose.
Sth. like anonymous classes (#331 (comment)) seem more suitable for some of such cases considering one of pkl's stated advantages (https://pkl-lang.org/main/current/introduction/comparison.html#general-purpose-langs)
Is something like this planned or are there other means to achieve this?
Thank you
The text was updated successfully, but these errors were encountered: