Skip to content

Commit 11fd31f

Browse files
committed
feat: pass log, state to Options.Interface
BREAKING CHANGE: Options.Interface signature change
1 parent e55a07b commit 11fd31f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export interface Plugin<
137137
action: A,
138138
...plugins: Plugin<B, T>[]
139139
) => void,
140+
log: Action<U>[],
140141
state: T[Options.State]
141142
) => {}
142143
[Options.Keys]?: Array<string | number | symbol>
@@ -391,7 +392,11 @@ class Lens<T extends Settings> {
391392
[SYMBOL_STATE]: this.state.state
392393
},
393394
...this.state.records.map(record =>
394-
record[Options.Interface](this.dispatch, this.state.state)
395+
record[Options.Interface](
396+
this.dispatch,
397+
this.state.log,
398+
this.state.state
399+
)
395400
)
396401
)
397402

0 commit comments

Comments
 (0)