Comparing version 0.14.1 to 0.14.2
@@ -1,12 +0,35 @@ | ||
import { Event, Tuple } from 'effector'; | ||
import { Unit, Store, Event, Effect } from 'effector'; | ||
export function combineEvents<Shape extends Tuple>( | ||
shape: Shape, | ||
): Event< | ||
{ [K in keyof Shape]: Shape[K] extends Event<infer U> ? U : Shape[K] } | ||
>; | ||
export function combineEvents<Shape>( | ||
shape: Shape, | ||
): Event< | ||
{ [K in keyof Shape]: Shape[K] extends Event<infer U> ? U : Shape[K] } | ||
>; | ||
type Tuple<T = unknown> = [T] | T[]; | ||
type Results = { [key: string]: any } | Tuple<any>; | ||
type Events<Result> = { | ||
[Key in keyof Result]: Event<Result[Key]>; | ||
}; | ||
type ReturnTarget<Result, Target> = Target extends Store<infer S> | ||
? S extends Result | ||
? Store<S> | ||
: Store<Result> | ||
: Target extends Event<infer E> | ||
? E extends Result | ||
? Event<E> | ||
: Event<Result> | ||
: Target extends Effect<infer P, infer D, infer F> | ||
? P extends Result | ||
? Effect<P, D, F> | ||
: Effect<Result, D, F> | ||
: Unit<Result>; | ||
export function combineEvents<T extends Results>(config: { | ||
events: Events<T>; | ||
reset?: Unit<any>; | ||
}): Event<T>; | ||
export function combineEvents< | ||
T extends Results, | ||
Target extends Unit<Results> | ||
>(config: { | ||
events: Events<T>; | ||
target: Target; | ||
reset?: Unit<any>; | ||
}): ReturnTarget<T, Target>; |
{ | ||
"name": "patronum", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "☄️ Effector utility library delivering modularity and convenience", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
38703
374