stream-executor
Advanced tools
Comparing version 1.3.0 to 1.3.1
export interface BaseExecutor { | ||
readonly initialValue: any; | ||
stream: (...args: any[]) => Omit<this, 'stream'>; | ||
execute: (...args: any[]) => any; | ||
} |
@@ -7,4 +7,5 @@ import { BaseExecutor } from './__interfaces__'; | ||
constructor(initialValue: T); | ||
get initialValue(): T; | ||
stream<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<T, B>, act3?: Action<T, C>, act4?: Action<T, D>, act5?: Action<T, E>, act6?: Action<T, F>, act7?: Action<T, G>, act8?: Action<T, H>, act9?: Action<T, I>, act10?: Action<T, J>): Omit<this, 'stream'>; | ||
execute(onError?: (error: any) => any): void; | ||
} |
@@ -8,2 +8,5 @@ "use strict"; | ||
} | ||
get initialValue() { | ||
return this._initialValue; | ||
} | ||
stream(act1, act2, act3, act4, act5, act6, act7, act8, act9, act10) { | ||
@@ -10,0 +13,0 @@ const _actions = [ |
@@ -8,2 +8,3 @@ import { BaseExecutor } from './__interfaces__'; | ||
constructor(initialValue: T); | ||
get initialValue(): T; | ||
stream<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<A, B>, act3?: Action<B, C>, act4?: Action<C, D>, act5?: Action<D, E>, act6?: Action<E, F>, act7?: Action<F, G>, act8?: Action<G, H>, act9?: Action<H, I>, act10?: Action<I, J>): Omit<this, 'stream'>; | ||
@@ -10,0 +11,0 @@ asAsync(): Pick<this, 'execute'>; |
@@ -9,2 +9,5 @@ "use strict"; | ||
} | ||
get initialValue() { | ||
return this._initialValue; | ||
} | ||
stream(act1, act2, act3, act4, act5, act6, act7, act8, act9, act10) { | ||
@@ -11,0 +14,0 @@ const _actions = [ |
@@ -27,3 +27,3 @@ import { Action } from '../types'; | ||
*/ | ||
chain<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<A, B>, act3?: Action<B, C>, act4?: Action<C, D>, act5?: Action<D, E>, act6?: Action<E, F>, act7?: Action<F, G>, act8?: Action<G, H>, act9?: Action<H, I>, act10?: Action<I, J>): Pick<Pick<BaseExecutor, "execute">, "execute">; | ||
chain<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<A, B>, act3?: Action<B, C>, act4?: Action<C, D>, act5?: Action<D, E>, act6?: Action<E, F>, act7?: Action<F, G>, act8?: Action<G, H>, act9?: Action<H, I>, act10?: Action<I, J>): Pick<Pick<BaseExecutor, "execute" | "initialValue">, "execute" | "initialValue">; | ||
/** | ||
@@ -43,3 +43,3 @@ * batch execute, like `when` in Kotlin. | ||
*/ | ||
batch<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<T, B>, act3?: Action<T, C>, act4?: Action<T, D>, act5?: Action<T, E>, act6?: Action<T, F>, act7?: Action<T, G>, act8?: Action<T, H>, act9?: Action<T, I>, act10?: Action<T, J>): Pick<Pick<BaseExecutor, "execute">, "execute">; | ||
batch<A, B, C, D, E, F, G, H, I, J>(act1: Action<T, A>, act2?: Action<T, B>, act3?: Action<T, C>, act4?: Action<T, D>, act5?: Action<T, E>, act6?: Action<T, F>, act7?: Action<T, G>, act8?: Action<T, H>, act9?: Action<T, I>, act10?: Action<T, J>): Pick<Pick<BaseExecutor, "execute" | "initialValue">, "execute">; | ||
private _create; | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "stream-executor", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "functional stream programming", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -210,5 +210,7 @@ # stream-executor | ||
- Set `option.chainClass` or `option.batchClass` if you would change execution process, please | ||
- These Classes are initialized with initialValue as an argument | ||
```ts | ||
import { BaseExecutor, createStream } from 'stream-executor' | ||
class MockChainExecutor implements BaseExecutor { | ||
constructor(public initialValue: any) {} | ||
stream(...args: any[]) { | ||
@@ -223,2 +225,3 @@ return this | ||
class MockBatchExecutor implements BaseExecutor { | ||
constructor(public initialValue: any) {} | ||
stream(...args: any[]) { | ||
@@ -225,0 +228,0 @@ return this |
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
29877
657
253