Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

patronum

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patronum - npm Package Compare versions

Comparing version 0.14.1 to 0.14.2

45

combine-events/index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc