LionWeb-io / lionweb-typescript

Implements (select parts of) the LionWeb specification, and tooling around that - all in TypeScript.
Apache License 2.0
10 stars 4 forks source link

Support deserialization of custom primitive types #158

Closed ftomassetti closed 1 month ago

ftomassetti commented 1 month ago

Based on the discussion we had during the meeting on the 25th of May, my understanding is that the different implementation of the libraries can provide custom deserializers for primitive types, as this is not something defined by the specification (neither required or forbidden).

So I thought I could put together an initial implementation to start the conversation.

In this PR we:

If the general approach works I could also add support for primitive type serializer.

I am no TS or functional code expert, so I thought it made sense to open a PR early to check if I am going in a direction that makes sense for the library. Feedback is very well appreciated :)

Fix #156

ftomassetti commented 1 month ago

@dslmeinte thank you for the review, I should have applied the suggested corrections

ftomassetti commented 1 month ago

Sorry: some more suggested refactorings...

Thank you, I think they are helping making the solution better

ftomassetti commented 1 month ago

@dslmeinte sorry for all the troubles. At some point WebStorm did not push the commits and I did not noticed that