Skip to content

Commit

Permalink
Merge pull request #335 from domosedov/patch-1
Browse files Browse the repository at this point in the history
fix(reset): Event type
  • Loading branch information
YanLobat authored Sep 30, 2024
2 parents 176cf5f + f43c50a commit 587d936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reset/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createEvent } from 'effector';

import type { Event, Unit, Store, StoreWritable } from 'effector';
import type { EventCallable, Unit, Store, StoreWritable } from 'effector';

type Params = {
clock?: Unit<any> | Array<Unit<any>>;
target: StoreWritable<any> | Array<StoreWritable<any>>;
};

export function reset(config: Required<Params>): void;
export function reset(config: Pick<Params, 'target'>): Event<void>;
export function reset(config: Pick<Params, 'target'>): EventCallable<void>;

export function reset({ clock, target }: Params) {
const targets = Array.isArray(target) ? target : [target];
Expand Down

0 comments on commit 587d936

Please sign in to comment.