diff --git a/src/extra/delay.ts b/src/extra/delay.ts index 1a92bb8..035a0f1 100644 --- a/src/extra/delay.ts +++ b/src/extra/delay.ts @@ -85,8 +85,8 @@ class DelayOperator implements Operator { * @param {number} period The amount of silence required in milliseconds. * @return {Stream} */ -export default function delay(period: number): (ins: Stream) => Stream { - return function delayOperator(ins: Stream): Stream { +export default function delay(period: number): (ins: Stream) => Stream { + return function delayOperator(ins: Stream): Stream { return new Stream(new DelayOperator(period, ins)); }; } diff --git a/src/extra/dropRepeats.ts b/src/extra/dropRepeats.ts index eaede71..32aa9c6 100644 --- a/src/extra/dropRepeats.ts +++ b/src/extra/dropRepeats.ts @@ -112,8 +112,8 @@ export class DropRepeatsOperator implements Operator { * checks if it is equal to previous event, by returning a boolean. * @return {Stream} */ -export default function dropRepeats(isEqual: (x: T, y: T) => boolean = null): (ins: Stream) => Stream { - return function dropRepeatsOperator(ins: Stream): Stream { - return new Stream(new DropRepeatsOperator(isEqual, ins)); +export default function dropRepeats(isEqual: (x: T, y: T) => boolean = null): (ins: Stream) => Stream { + return function dropRepeatsOperator(ins: Stream): Stream { + return new Stream(new DropRepeatsOperator(isEqual, ins)); }; } diff --git a/src/extra/dropUntil.ts b/src/extra/dropUntil.ts index d5b52f2..f3c27c3 100644 --- a/src/extra/dropUntil.ts +++ b/src/extra/dropUntil.ts @@ -110,8 +110,8 @@ export class DropUntilOperator implements Operator { * output stream of this operator start emitting. * @return {Stream} */ -export default function dropUntil(other: Stream): (ins: Stream) => Stream { - return function dropUntilOperator(ins: Stream): Stream { +export default function dropUntil(other: Stream): (ins: Stream) => Stream { + return function dropUntilOperator(ins: Stream): Stream { return new Stream(new DropUntilOperator(other, ins)); }; } diff --git a/src/extra/split.ts b/src/extra/split.ts index 7b8c714..7426dcb 100644 --- a/src/extra/split.ts +++ b/src/extra/split.ts @@ -128,8 +128,8 @@ export class SplitOperator implements Operator> { * split the output stream. * @return {Stream} */ -export default function split(separator: Stream): (ins: Stream) => Stream> { - return function splitOperator(ins: Stream): Stream> { +export default function split(separator: Stream): (ins: Stream) => Stream> { + return function splitOperator(ins: Stream): Stream> { return new Stream>(new SplitOperator(separator, ins)); }; } diff --git a/tests/extra/dropUntil.ts b/tests/extra/dropUntil.ts index 6bc1845..686b182 100644 --- a/tests/extra/dropUntil.ts +++ b/tests/extra/dropUntil.ts @@ -26,7 +26,7 @@ describe('dropUntil (extra)', () => { it('should complete the stream when another stream emits complete', (done) => { const source = xs.periodic(50).take(6); - const other = xs.empty().compose(delay(220)); + const other = xs.empty().compose(delay(220)); const stream = source.compose(dropUntil(other)); const expected = [4, 5]; diff --git a/tests/operator/endWhen.ts b/tests/operator/endWhen.ts index 45abf16..09c46eb 100644 --- a/tests/operator/endWhen.ts +++ b/tests/operator/endWhen.ts @@ -25,7 +25,7 @@ describe('Stream.prototype.endWhen', () => { it('should complete the stream when another stream emits complete', (done) => { const source = xs.periodic(50); - const other = xs.empty().compose(delay(220)); + const other = xs.empty().compose(delay(220)); const stream = source.endWhen(other); const expected = [0, 1, 2, 3]; diff --git a/tests/operator/imitate.ts b/tests/operator/imitate.ts index c52f06c..5a94da4 100644 --- a/tests/operator/imitate.ts +++ b/tests/operator/imitate.ts @@ -8,7 +8,7 @@ describe('Stream.prototype.imitate', () => { it('should be able to model a circular dependency in the stream graph', (done) => { const secondMimic = xs.create(); const first = secondMimic.map(x => x * 10).take(3); - const second = first.map(x => x + 1).startWith(1).compose(delay(1)); + const second = first.map(x => x + 1).startWith(1).compose(delay(1)); secondMimic.imitate(second); const expected = [1, 11, 111, 1111]; @@ -27,7 +27,7 @@ describe('Stream.prototype.imitate', () => { it('should be able to model a circular dependency, mimic subscribed', (done) => { const secondMimic = xs.create(); const first = secondMimic.map(x => x * 10).take(3); - const second = first.map(x => x + 1).startWith(1).compose(delay(1)); + const second = first.map(x => x + 1).startWith(1).compose(delay(1)); secondMimic.imitate(second); const expected = [1, 11, 111, 1111]; @@ -46,7 +46,7 @@ describe('Stream.prototype.imitate', () => { it('should broadcast the source stream to multiple listeners', (done) => { const fakeSecond = xs.create(); const first = fakeSecond.map(x => x * 10).take(3); - const second = first.map(x => x + 1).startWith(1).compose(delay(100)); + const second = first.map(x => x + 1).startWith(1).compose(delay(100)); fakeSecond.imitate(second); const expected1 = [1, 11, 111, 1111]; @@ -160,7 +160,7 @@ describe('Stream.prototype.imitate', () => { const outside = xs.periodic(150); const secondMimic = xs.create(); const first = xs.merge(outside, secondMimic.map(x => x * 10)); - const second = first.map(x => x + 1).compose(delay(100)); + const second = first.map(x => x + 1).compose(delay(100)); secondMimic.imitate(second); const expectedSecond1 = [1]; const expectedSecond4 = [1, 11, 2, 111]; @@ -217,7 +217,7 @@ describe('Stream.prototype.imitate', () => { if (state === 3) { throw new Error(':('); } - return xs.of(1).compose(delay(20)); + return xs.of(1).compose(delay(20)); }).flatten(); proxyAction$.imitate(action$); const expected = [0, 1, 2];