Skip to content

Commit 0c45ba0

Browse files
committed
fix(options): fix createUpdater options issue
1 parent cb14196 commit 0c45ba0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export function createUpdater<
7575
TContext extends MachineContext,
7676
TExpressionEvent extends MutativeUpdateEvent,
7777
TEvent extends EventObject,
78-
TActor extends ProvidedActor = ProvidedActor
78+
TActor extends ProvidedActor = ProvidedActor,
79+
TAutoFreeze extends boolean = false
7980
>(
8081
type: TExpressionEvent['type'],
8182
recipe: MutativeAssigner<
@@ -84,7 +85,8 @@ export function createUpdater<
8485
ParameterizedObject['params'] | undefined,
8586
TEvent,
8687
TActor
87-
>
88+
>,
89+
mutativeOptions?: MutativeOptions<false, TAutoFreeze>
8890
) {
8991
const update = (input: TExpressionEvent['input']): TExpressionEvent => {
9092
return {
@@ -100,8 +102,9 @@ export function createUpdater<
100102
TExpressionEvent,
101103
ParameterizedObject['params'] | undefined, // TODO: not sure if this is correct
102104
TEvent,
103-
TActor
104-
>(recipe),
105+
TActor,
106+
TAutoFreeze
107+
>(recipe, mutativeOptions),
105108
type,
106109
};
107110
}

0 commit comments

Comments
 (0)