@rimbu/common
Advanced tools
Comparing version 0.7.5 to 0.8.0
@@ -194,3 +194,7 @@ "use strict"; | ||
AsyncReducer.createOutput = createOutput; | ||
function from(reducer) { | ||
return AsyncReducer.create(reducer.init, reducer.next, reducer.stateToResult); | ||
} | ||
AsyncReducer.from = from; | ||
})(AsyncReducer = exports.AsyncReducer || (exports.AsyncReducer = {})); | ||
//# sourceMappingURL=async-reducer.js.map |
@@ -135,3 +135,7 @@ import { __awaiter } from "tslib"; | ||
AsyncReducer.createOutput = createOutput; | ||
function from(reducer) { | ||
return AsyncReducer.create(reducer.init, reducer.next, reducer.stateToResult); | ||
} | ||
AsyncReducer.from = from; | ||
})(AsyncReducer || (AsyncReducer = {})); | ||
//# sourceMappingURL=async-reducer.js.map |
@@ -1,2 +0,2 @@ | ||
import { AsyncCollectFun, AsyncOptLazy, MaybePromise } from './internal'; | ||
import { AsyncCollectFun, AsyncOptLazy, MaybePromise, Reducer } from './internal'; | ||
/** | ||
@@ -192,2 +192,3 @@ * An `AsyncReducer` is a stand-alone asynchronous calculation that takes input values of type I, | ||
function createOutput<I, O = I>(init: AsyncOptLazy<O>, next: (current: O, next: I, index: number, halt: () => void) => MaybePromise<O>, stateToResult?: (state: O) => MaybePromise<O>, onClose?: (state: O, error?: unknown) => MaybePromise<void>): AsyncReducer<I, O>; | ||
function from<I, O>(reducer: Reducer<I, O>): AsyncReducer<I, O>; | ||
} |
{ | ||
"name": "@rimbu/common", | ||
"version": "0.7.5", | ||
"version": "0.8.0", | ||
"description": "Common types and objects used in many other Rimbu packages", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "20739fd0c0d5c565eeecd3e266dd51f893e8d67c" | ||
"gitHead": "c321aa32b1c5fd8ca8b7fb1c26bd4f7bbf3ef70d" | ||
} |
@@ -71,15 +71,2 @@ <p align="center"> | ||
## Recommended `tsconfig.json` settings | ||
Rimbu uses advanced and recursive typing, potentially making the TypeScript compiler quite slow in some cases, or causing infinite recursion. It is recommended to set the following values in the `tsconfig.json` file of your project: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"skipLibCheck": true, | ||
"noStrictGenericChecks": true | ||
} | ||
} | ||
``` | ||
## Usage | ||
@@ -86,0 +73,0 @@ |
@@ -6,2 +6,3 @@ import { | ||
MaybePromise, | ||
Reducer, | ||
} from './internal'; | ||
@@ -352,2 +353,10 @@ | ||
} | ||
export function from<I, O>(reducer: Reducer<I, O>): AsyncReducer<I, O> { | ||
return AsyncReducer.create( | ||
reducer.init, | ||
reducer.next, | ||
reducer.stateToResult | ||
); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
380721
7510
99