import { Snapshots } from 'roosterjs-editor-types' ; import { UndoSnapshotsService } from 'roosterjs-editor-core' ; import { addSnapshot , canMoveCurrentSnapshot , moveCurrentSnapsnot , clearProceedingSnapshots , } from 'roosterjs-editor-dom' ; export default class UndoSnapshots implements UndoSnapshotsService { constructor ( private snapshots ) { } public canMove ( delta ) { return canMoveCurrentSnapshot ( this . snapshots , delta ) ; } public move ( delta ) { return moveCurrentSnapsnot ( this . snapshots , delta ) ; } public addSnapshot ( snapshot ) { addSnapshot ( this . snapshots , snapshot ) ; } public clearRedo ( ) { clearProceedingSnapshots ( this . snapshots ) ; } }