Skip to content

Latest commit

 

History

History
106 lines (61 loc) · 1.62 KB

Revision.md

File metadata and controls

106 lines (61 loc) · 1.62 KB

o-spreadsheet API / Revision

Class: Revision

Implements

  • RevisionData

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Revision(id, clientId, commands, changes?)

A revision represents a whole client action (Create a sheet, merge a Zone, Undo, ...). A revision contains the following information:

  • id: ID of the revision
  • commands: CoreCommands that are linked to the action, and should be dispatched in other clients
  • clientId: Client who initiated the action
  • changes: List of changes applied on the state.

Parameters

Name Type
id UID
clientId string
commands readonly CoreCommand[]
changes? readonly HistoryChange[]

Properties

clientId

Readonly clientId: string

Implementation of

RevisionData.clientId


id

Readonly id: UID

Implementation of

RevisionData.id

Accessors

changes

get changes(): readonly HistoryChange[]

Returns

readonly HistoryChange[]


commands

get commands(): readonly CoreCommand[]

Returns

readonly CoreCommand[]

Methods

setChanges

setChanges(changes): void

Parameters

Name Type
changes readonly HistoryChange[]

Returns

void