@most/core
Advanced tools
Comparing version 1.3.5 to 1.4.0
{ | ||
"name": "@most/core", | ||
"version": "1.3.5", | ||
"version": "1.4.0", | ||
"description": "Reactive programming with lean, functions-only, curried, tree-shakeable API", | ||
@@ -5,0 +5,0 @@ "typings": "type-definitions/most.d.ts", |
import { Stream } from '@most/types'; | ||
import { ToStreamsArray } from './variadic' | ||
@@ -8,37 +9,3 @@ export function combine<A, B, R>(fn: (a: A, b: B) => R, a: Stream<A>, b: Stream<B>): Stream<R>; | ||
export function combineArray<A, B, R>( | ||
fn: (a: A, b: B) => R, | ||
streams: [Stream<A>, Stream<B>] | ||
): Stream<R>; | ||
export function combineArray<A, B, C, R>( | ||
fn: (a: A, b: B, c: C) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>] | ||
): Stream<R>; | ||
export function combineArray<A, B, C, D, R>( | ||
fn: (a: A, b: B, c: C, d: D) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>] | ||
): Stream<R>; | ||
export function combineArray<A, B, C, D, E, R>( | ||
fn: (a: A, b: B, c: C, d: D, e: E) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>, Stream<E>] | ||
): Stream<R>; | ||
export function combineArray<V, R> ( | ||
fn: (...items: V[]) => R, | ||
items: Stream<V>[] | ||
): Stream<R>; | ||
export function combineArray<A, B, R>( | ||
fn: (a: A, b: B) => R,): | ||
(streams: [Stream<A>, Stream<B>]) => Stream<R>; | ||
export function combineArray<A, B, C, R>( | ||
fn: (a: A, b: B, c: C) => R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>]) => Stream<R>; | ||
export function combineArray<A, B, C, D, R>( | ||
fn: (a: A, b: B, c: C, d: D) => R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>]) => Stream<R>; | ||
export function combineArray<A, B, C, D, E, R>( | ||
fn: (a: A, b: B, c: C, d: D, e: E) => R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>, Stream<E>]) => Stream<R>; | ||
export function combineArray<V, R> ( | ||
fn: (...items: V[]) => R): | ||
(items: Stream<V>[]) => Stream<R>; | ||
export function combineArray<Args extends any[], R>(fn: (...args: Args) => R, streams: ToStreamsArray<Args>): Stream<R>; | ||
export function combineArray<Args extends any[], R>(fn: (...args: Args) => R): (streams: ToStreamsArray<Args>) => Stream<R>; |
@@ -5,2 +5,7 @@ import { Stream } from '@most/types'; | ||
export function merge<A, B>(s1: Stream<A>): (s2: Stream<B>) => Stream<A | B> | ||
export function mergeArray<A>(streams: Array<Stream<A>>): Stream<A>; | ||
// TODO: use readonly Stream<any>[] once TS 3.4.x has been in the wild for "enough" time | ||
type MergeArray<S extends ReadonlyArray<Stream<any>>> = Value<S[number]> | ||
type Value<S> = S extends Stream<infer A> ? A : never | ||
export function mergeArray<S extends ReadonlyArray<Stream<any>>>(streams: S): Stream<MergeArray<S>>; |
import { Stream } from '@most/types'; | ||
import { ToStreamsArray } from './variadic' | ||
@@ -8,36 +9,3 @@ export function zip<A, B, R>(fn: (a: A, b: B) => R, a: Stream<A>, b: Stream<B>): Stream<R>; | ||
export function zipArray<A, B, R>( | ||
fn: (a: A, b: B) => R, | ||
streams: [Stream<A>, Stream<B>] | ||
): Stream<R>; | ||
export function zipArray<A, B, C, R>( | ||
fn: (a: A, b: B, c: C) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>] | ||
): Stream<R>; | ||
export function zipArray<A, B, C, D, R>( | ||
fn: (a: A, b: B, c: C, d: D) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>] | ||
): Stream<R>; | ||
export function zipArray<A, B, C, D, E, R>( | ||
fn: (a: A, b: B, c: C, d: D, e: E) => R, | ||
streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>, Stream<E>] | ||
): Stream<R>; | ||
export function zipArray<V, R> ( | ||
fn: (...items: V[]) => R, | ||
items: Stream<V>[] | ||
): Stream<R>; | ||
export function zipArray<A, B, R>(fn: (a: A, b: B) => R): | ||
(streams: [Stream<A>, Stream<B>]) => Stream<R>; | ||
export function zipArray<A, B, C, R>(fn: (a: A, b: B, c: C)=> R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>]) => Stream<R>; | ||
export function zipArray<A, B, C, D, R>(fn: (a: A, b: B, c: C, d: D) => R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>]) => Stream<R>; | ||
export function zipArray<A, B, C, D, E, R>(fn: (a: A, b: B, c: C, d: D, e: E) => R): | ||
(streams: [Stream<A>, Stream<B>, Stream<C>, Stream<D>, Stream<E>]) => Stream<R>; | ||
export function zipArray<V, R> (fn: (...items: V[]) => R): | ||
(items: Stream<V>[]) => Stream<R>; | ||
export function zipArray<Args extends any[], R>(fn: (...args: Args) => R, streams: ToStreamsArray<Args>): Stream<R>; | ||
export function zipArray<Args extends any[], R>(fn: (...args: Args) => R): (streams: ToStreamsArray<Args>) => Stream<R>; |
Sorry, the diff of this file is not supported yet
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
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
43
449762
5105