Rezi
    Preparing search index...

    Interface StateTimeline

    State timeline interface for tracking state changes.

    interface StateTimeline {
        count: number;
        clear(): void;
        getChanges(
            since?: bigint,
        ): readonly Readonly<
            {
                after: unknown;
                before: unknown;
                field: string;
                frameId: bigint;
                timestamp: number;
            },
        >[];
        getFrameChanges(
            frameId: bigint,
        ): readonly Readonly<
            {
                after: unknown;
                before: unknown;
                field: string;
                frameId: bigint;
                timestamp: number;
            },
        >[];
        recordChange(
            frameId: bigint,
            timestamp: number,
            field: string,
            before: unknown,
            after: unknown,
        ): void;
    }
    Index

    Properties

    count: number

    Get the number of recorded changes.

    Methods

    • Get all changes since a given frame ID.

      Parameters

      • Optionalsince: bigint

        Frame ID to start from (exclusive)

      Returns readonly Readonly<
          {
              after: unknown;
              before: unknown;
              field: string;
              frameId: bigint;
              timestamp: number;
          },
      >[]

    • Get changes for a specific frame.

      Parameters

      • frameId: bigint

        The frame ID

      Returns readonly Readonly<
          {
              after: unknown;
              before: unknown;
              field: string;
              frameId: bigint;
              timestamp: number;
          },
      >[]

    • Record a state change. Called by the app runtime when state is updated.

      Parameters

      • frameId: bigint
      • timestamp: number
      • field: string
      • before: unknown
      • after: unknown

      Returns void