import type { SchemaToJsonNode } from '../../json-crdt/schema/types'; import type { SCHEMA } from './constants'; /** * Represents an object which state can change over time. * * @todo Move to /src/utils. */ export interface Stateful { /** * Hash of the current state. Updated by calling `refresh()`. */ hash: number; /** * Recomputes object's hash. * @returns The new hash. */ refresh(): number; } export type PeritextDataNodeSchema = ReturnType; export type PeritextDataNode = SchemaToJsonNode; export interface UiLifeCycles { /** * Called when UI component is mounted. Returns a function to be called when * the component is removed from the screen. */ start(): () => void; } //# sourceMappingURL=types.d.ts.map