The archive calls the version history panel makes; HistoryArchive provides them.
Members
Methods
saveVersion( name: string, authorId: string, time: number, signal?: AbortSignal, ): Promise<HistoryVersion>;Names the archived head as a new version.
listVersions(options?: { maxEntries?: number; cursor?: string; signal?: AbortSignal; }): Promise<HistoryListPage>;Returns one page of versions, newest first.
Rebuilds the document as it was at one version.
Returns one page of the cell changes between two versions.
restoreVersion( grid: Grid, id: string, scope: HistoryRestoreScope, options?: HistoryRestoreOptions, ): Promise<ApplyTransactionResult>;Restores all or part of a version into the grid as one undoable change.
releaseMemory?(): void;optional
Frees the version that the archive keeps rebuilt between calls. The panel calls it when it closes and when the grid trims memory.
Declaration
View full TypeScript declaration
export interface HistoryPanelArchive { saveVersion( name: string, authorId: string, time: number, signal?: AbortSignal, listVersions(options?: { maxEntries?: number; cursor?: string; signal?: AbortSignal; restoreVersion( id: string, releaseMemory?(): void;}Referenced by
Public exports naming HistoryPanelArchive
HistoryAddonOptions@sheetwrite/core