Commit Graph

3 Commits

Author SHA1 Message Date
hypercross 05674a349f refactor: improve type safety in World and tests
Replace `any` types with specific interfaces like `WorldEvent`,
`QueryUpdate`, and `Entity` to strengthen type checking. This includes
refining the deserialization logic in `World.fromSnapshot` to use
properly typed component definitions.
2026-05-31 16:24:59 +08:00
hypercross 1c55485f9f feat: add world serialization support
Introduce `toJSON` and `fromJSON` methods to the `World` class to
allow saving and restoring world states. This requires components and
relationships to have human-readable names for stable serialization.
2026-05-31 16:10:19 +08:00
hypercross ba4a688f57 test: add vitest and implement unit tests 2026-05-31 15:47:19 +08:00