Skip to content

Commit

Permalink
fix(reset): Event type
Browse files Browse the repository at this point in the history
  • Loading branch information
domosedov authored Jul 31, 2024
1 parent 75ad960 commit 56d0ede
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 56d0ede

Please sign in to comment.