Skip to content

Commit

Permalink
refactor(atom): minor update IHistory (add IClear)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Dec 29, 2019
1 parent 8d4745e commit 3efaefb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/atom/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
IClear,
IDeref,
IID,
INotify,
Expand Down Expand Up @@ -49,13 +50,12 @@ export interface CursorOpts<T> {
id?: string;
}

export interface IHistory<T> extends IAtom<T>, INotify {
export interface IHistory<T> extends IAtom<T>, IClear, INotify {
canUndo(): boolean;
canRedo(): boolean;

undo(): T | undefined;
redo(): T | undefined;
clear(): void;

record(): void;
}

0 comments on commit 3efaefb

Please sign in to comment.