WaywardGame / goodstream

Value streaming made as convenient as possible 🚀
MIT License
0 stars 0 forks source link

toArray/toObject/toMap/toSet should not allow inserting invalid values in the types #4

Closed ChiriVulpes closed 5 years ago

ChiriVulpes commented 5 years ago

If someone intends to combine two different types into an object, they should do a .merge followed by a .to<type> call, they shouldn't insert into an existing object of a different type.

Strongly typing this should prevent some bugs in codebases.