From 78ae89cfe1a234c1635752154964b34b49a366bb Mon Sep 17 00:00:00 2001 From: gitusp Date: Mon, 17 Jun 2019 20:07:04 +0900 Subject: [PATCH 1/2] Add `mergeMapConcurrently` definition --- .../core/type-definitions/combinator/mergeConcurrently.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/type-definitions/combinator/mergeConcurrently.d.ts b/packages/core/type-definitions/combinator/mergeConcurrently.d.ts index 15867b2c..3de7aebf 100644 --- a/packages/core/type-definitions/combinator/mergeConcurrently.d.ts +++ b/packages/core/type-definitions/combinator/mergeConcurrently.d.ts @@ -2,3 +2,8 @@ import { Stream } from '@most/types'; export function mergeConcurrently(concurrency: number, s: Stream>): Stream; export function mergeConcurrently(concurrency: number): (s: Stream>) => Stream; + +export function mergeMapConcurrently(f: (a: A) => Stream, concurrency: number, s: Stream): Stream; +export function mergeMapConcurrently(f: (a: A) => Stream): (concurrency: number, s: Stream) => Stream; +export function mergeMapConcurrently(f: (a: A) => Stream, concurrency: number): (s: Stream) => Stream; +export function mergeMapConcurrently(f: (a: A) => Stream): (concurrency: number) => (s: Stream) => Stream; From 8e8c0b3258a79b9bccb5351ddf854db82d50c217 Mon Sep 17 00:00:00 2001 From: gitusp Date: Tue, 18 Jun 2019 10:07:30 +0900 Subject: [PATCH 2/2] Fix `mergeMapConcurrently`'s type definitions It fixes `mergeMapConcurrently`'s type definitions to accept various forms of calling curried function. It applies the following reviews: - https://github.com/mostjs/core/pull/288#issuecomment-502695407 - https://github.com/mostjs/core/pull/288#issuecomment-502711708 --- .../core/type-definitions/combinator/mergeConcurrently.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/type-definitions/combinator/mergeConcurrently.d.ts b/packages/core/type-definitions/combinator/mergeConcurrently.d.ts index 3de7aebf..8ca16097 100644 --- a/packages/core/type-definitions/combinator/mergeConcurrently.d.ts +++ b/packages/core/type-definitions/combinator/mergeConcurrently.d.ts @@ -4,6 +4,8 @@ export function mergeConcurrently(concurrency: number, s: Stream>): export function mergeConcurrently(concurrency: number): (s: Stream>) => Stream; export function mergeMapConcurrently(f: (a: A) => Stream, concurrency: number, s: Stream): Stream; -export function mergeMapConcurrently(f: (a: A) => Stream): (concurrency: number, s: Stream) => Stream; export function mergeMapConcurrently(f: (a: A) => Stream, concurrency: number): (s: Stream) => Stream; -export function mergeMapConcurrently(f: (a: A) => Stream): (concurrency: number) => (s: Stream) => Stream; +export function mergeMapConcurrently(f: (a: A) => Stream): { + (concurrency: number, s: Stream): Stream; + (concurrency: number): (s: Stream) => Stream; +};