Table of contents

Public class

Signature
class HistoryManager<R extends UnknownRecord> {}
References

UnknownRecord

Source

packages/editor/src/lib/editor/managers/HistoryManager.ts


Constructor

Public constructor

Constructs a new instance of the HistoryManager class

Parameters
NameDescription

opts

{
  annotateError?: (error: unknown) => void
  store: Store<R>
}
References

Store


Properties

bail

Public property

Signature
bail: () => this

bailToMark

Public property

Signature
bailToMark: (id: string) => this

batch

Public property

Signature
batch: (fn: () => void, opts?: TLHistoryBatchOptions) => this

dispose

Public readonly property

Signature
readonly dispose: () => void

mark

Public property

Signature
mark: (id?: string) => string

onBatchComplete

Public property

Signature
onBatchComplete: () => void

redo

Public property

Signature
redo: () => this | undefined

undo

Public property

Signature
undo: () => this

Methods

clear()

Public method

Signature
clear(): void

getNumRedos()

Public method

Signature
getNumRedos(): number

getNumUndos()

Public method

Signature
getNumUndos(): number

ignore()

Public method

Signature
ignore(fn: () => void): this
Parameters
NameDescription

fn

() => void
Returns
this

hardResetEditorHIT_TEST_MARGIN