Comparing version 6.4.1 to 6.5.0
@@ -0,1 +1,16 @@ | ||
<a name="6.5.0"></a> | ||
# [6.5.0](https://github.com/staltz/xstream/compare/v6.4.1...v6.5.0) (2016-10-17) | ||
### Bug Fixes | ||
* **delay,dropRepeats,dropUnti,split:** improve TypeScript typings with better inference ([c96ff10](https://github.com/staltz/xstream/commit/c96ff10)) | ||
### Features | ||
* **throttle:** add throttle extra operator ([8b5c211](https://github.com/staltz/xstream/commit/8b5c211)) | ||
<a name="6.4.1"></a> | ||
@@ -2,0 +17,0 @@ ## [6.4.1](https://github.com/staltz/xstream/compare/v6.4.0...v6.4.1) (2016-09-28) |
@@ -41,2 +41,2 @@ import { Stream } from '../core'; | ||
*/ | ||
export default function delay<T>(period: number): (ins: Stream<T>) => Stream<T>; | ||
export default function delay(period: number): <T>(ins: Stream<T>) => Stream<T>; |
@@ -81,2 +81,2 @@ import { Operator, Stream } from '../core'; | ||
*/ | ||
export default function dropRepeats<T>(isEqual?: (x: T, y: T) => boolean): (ins: Stream<T>) => Stream<T>; | ||
export default function dropRepeats<T>(isEqual?: <T>(x: T, y: T) => boolean): <T>(ins: Stream<T>) => Stream<T>; |
@@ -59,2 +59,2 @@ import { Operator, Stream } from '../core'; | ||
*/ | ||
export default function dropUntil<T>(other: Stream<any>): (ins: Stream<T>) => Stream<T>; | ||
export default function dropUntil(other: Stream<any>): <T>(ins: Stream<T>) => Stream<T>; |
@@ -77,2 +77,2 @@ import { Operator, Stream } from '../core'; | ||
*/ | ||
export default function split<T>(separator: Stream<any>): (ins: Stream<T>) => Stream<Stream<T>>; | ||
export default function split(separator: Stream<any>): <T>(ins: Stream<T>) => Stream<Stream<T>>; |
{ | ||
"name": "xstream", | ||
"version": "6.4.1", | ||
"version": "6.5.0", | ||
"description": "An extremely intuitive, small, and fast functional reactive stream library for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -88,6 +88,6 @@ import {Operator, Stream} from '../core'; | ||
*/ | ||
export default function delay<T>(period: number): (ins: Stream<T>) => Stream<T> { | ||
return function delayOperator(ins: Stream<T>): Stream<T> { | ||
export default function delay(period: number): <T>(ins: Stream<T>) => Stream<T> { | ||
return function delayOperator<T>(ins: Stream<T>): Stream<T> { | ||
return new Stream<T>(new DelayOperator(period, ins)); | ||
}; | ||
} |
@@ -115,6 +115,6 @@ import {Operator, Stream} from '../core'; | ||
*/ | ||
export default function dropRepeats<T>(isEqual: (x: T, y: T) => boolean = null): (ins: Stream<T>) => Stream<T> { | ||
return function dropRepeatsOperator(ins: Stream<T>): Stream<T> { | ||
return new Stream<T>(new DropRepeatsOperator(isEqual, ins)); | ||
export default function dropRepeats<T>(isEqual: <T>(x: T, y: T) => boolean = null): <T>(ins: Stream<T>) => Stream<T> { | ||
return function dropRepeatsOperator<T>(ins: Stream<T>): Stream<T> { | ||
return new Stream<T>(new DropRepeatsOperator<T>(isEqual, ins)); | ||
}; | ||
} |
@@ -113,6 +113,6 @@ import {Operator, InternalListener, Stream, OutSender, NO_IL} from '../core'; | ||
*/ | ||
export default function dropUntil<T>(other: Stream<any>): (ins: Stream<T>) => Stream<T> { | ||
return function dropUntilOperator(ins: Stream<T>): Stream<T> { | ||
export default function dropUntil(other: Stream<any>): <T>(ins: Stream<T>) => Stream<T> { | ||
return function dropUntilOperator<T>(ins: Stream<T>): Stream<T> { | ||
return new Stream<T>(new DropUntilOperator(other, ins)); | ||
}; | ||
} |
@@ -131,6 +131,6 @@ import {Operator, InternalListener, Stream, OutSender, NO_IL} from '../core'; | ||
*/ | ||
export default function split<T>(separator: Stream<any>): (ins: Stream<T>) => Stream<Stream<T>> { | ||
return function splitOperator(ins: Stream<T>): Stream<Stream<T>> { | ||
export default function split(separator: Stream<any>): <T>(ins: Stream<T>) => Stream<Stream<T>> { | ||
return function splitOperator<T>(ins: Stream<T>): Stream<Stream<T>> { | ||
return new Stream<Stream<T>>(new SplitOperator(separator, ins)); | ||
}; | ||
} |
@@ -29,3 +29,3 @@ /// <reference path="../../typings/globals/mocha/index.d.ts" /> | ||
const source = xs.periodic(50).take(6); | ||
const other = xs.empty().compose(delay<any>(220)); | ||
const other = xs.empty().compose(delay(220)); | ||
const stream = source.compose(dropUntil(other)); | ||
@@ -32,0 +32,0 @@ const expected = [4, 5]; |
@@ -28,3 +28,3 @@ /// <reference path="../../typings/globals/mocha/index.d.ts" /> | ||
const source = xs.periodic(50); | ||
const other = xs.empty().compose(delay<any>(220)); | ||
const other = xs.empty().compose(delay(220)); | ||
const stream = source.endWhen(other); | ||
@@ -31,0 +31,0 @@ const expected = [0, 1, 2, 3]; |
@@ -11,3 +11,3 @@ /// <reference path="../../typings/globals/mocha/index.d.ts" /> | ||
const first = secondMimic.map(x => x * 10).take(3); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay<number>(1)); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay(1)); | ||
secondMimic.imitate(second); | ||
@@ -31,3 +31,3 @@ const expected = [1, 11, 111, 1111]; | ||
const first = secondMimic.map(x => x * 10).take(3); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay<number>(1)); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay(1)); | ||
secondMimic.imitate(second); | ||
@@ -51,3 +51,3 @@ const expected = [1, 11, 111, 1111]; | ||
const first = fakeSecond.map(x => x * 10).take(3); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay<number>(100)); | ||
const second = first.map(x => x + 1).startWith(1).compose(delay(100)); | ||
fakeSecond.imitate(second); | ||
@@ -166,3 +166,3 @@ | ||
const first = xs.merge(outside, secondMimic.map(x => x * 10)); | ||
const second = first.map(x => x + 1).compose(delay<number>(100)); | ||
const second = first.map(x => x + 1).compose(delay(100)); | ||
secondMimic.imitate(second); | ||
@@ -224,3 +224,3 @@ const expectedSecond1 = [1]; | ||
} | ||
return xs.of(1).compose(delay<number>(20)); | ||
return xs.of(1).compose(delay(20)); | ||
}).flatten(); | ||
@@ -227,0 +227,0 @@ proxyAction$.imitate(action$); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
913916
158
17834