Skip to content

Commit

Permalink
fix(utils): declaration generation for utils.ts (#193)
Browse files Browse the repository at this point in the history
* fix(utils): declaration generation for utils.ts 

inline typecasted the ref output to fix the type generation blocker

* codestyle: eslint
  • Loading branch information
barelyhuman authored Jul 28, 2021
1 parent 827f0a5 commit 4d31c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export const proxyWithHistory = <V>(initialValue: V) => {
wip: initialValue, // to avoid infinite loop
snapshots: [] as V[],
index: -1,
}),
}) as { wip: V; snapshots: V[]; index: number },
canUndo: () => proxyObject.history.index > 0,
undo: () => {
if (proxyObject.canUndo()) {
Expand Down

0 comments on commit 4d31c21

Please sign in to comment.