11 lines
399 B
TypeScript
11 lines
399 B
TypeScript
/**
|
|
* Plain JSON-compatible representation of a World.
|
|
* Returned by `world.toJSON()`, consumed by `World.fromJSON()`.
|
|
*/
|
|
export interface WorldSnapshot {
|
|
/** Entity stable ID → component map (component name → data). */
|
|
entities: Record<string, Record<string, unknown>>;
|
|
/** Relationship name → (source ID → target ID). */
|
|
relationships: Record<string, Record<string, string>>;
|
|
}
|