Commit Graph

5 Commits

Author SHA1 Message Date
hypercross 365b2c4d13 fix: handle edge object in serialization tests
Add `typecheck` script to package.json, expand tsconfig include
paths to cover tests and examples, and update serialization tests
to correctly resolve player IDs from relationship edges.
2026-06-02 18:05:47 +08:00
hypercross 87c01858e7 test: add missing types to serialization tests 2026-05-31 16:36:25 +08:00
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 9953c7c556 test: expand serialization test coverage 2026-05-31 16:13:01 +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