Skip to content

Commit

Permalink
fix(and,or): types when used different store types #206
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Jun 28, 2022
1 parent e705d14 commit 6fff7e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/and/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { combine, Store } from 'effector';

export function and(...stores: Array<Store<unknown>>): Store<boolean> {
export function and(...stores: Array<Store<any>>): Store<boolean> {
return combine(stores, (values) =>
values.reduce((all, current) => Boolean(all) && Boolean(current)),
) as Store<boolean>;
Expand Down
2 changes: 1 addition & 1 deletion src/or/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { combine, Store } from 'effector';

export function or(...stores: Array<Store<unknown>>): Store<boolean> {
export function or(...stores: Array<Store<any>>): Store<boolean> {
return combine(stores, (values) =>
values.reduce((all, current) => Boolean(all) || Boolean(current)),
) as Store<boolean>;
Expand Down

0 comments on commit 6fff7e0

Please sign in to comment.