diff --git a/extensions/snapshot/src/index.ts b/extensions/snapshot/src/index.ts index 4c9586c8..4357e451 100644 --- a/extensions/snapshot/src/index.ts +++ b/extensions/snapshot/src/index.ts @@ -38,7 +38,7 @@ export default function snapshotExtension(options?: Pa function snapshot(branchCallback: BranchCallback = ((state: TState) => state) as any): Snapshot { const snapshotBranch = branchCallback(store.state); - const state = Object.freeze(clone(snapshotBranch)); + const state = Object.freeze(clone(snapshotBranch)) as TBranchState; return { state, diff --git a/extensions/transaction/src/index.ts b/extensions/transaction/src/index.ts index 92fd8153..7bcfbc3a 100644 --- a/extensions/transaction/src/index.ts +++ b/extensions/transaction/src/index.ts @@ -30,7 +30,7 @@ export default function transactionExtension() { function transaction(name: string, transactor: Transactor): Transaction { return payload => { - const snapshot = clone(store.state); + const snapshot = clone(store.state) as ReadState; const eventData = { payload,