stream: Remove tslint

This commit is contained in:
willclarktech 2020-06-24 17:56:51 +02:00
parent d6bf4055a6
commit f355f63df9
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
8 changed files with 0 additions and 28 deletions

View File

@ -1,4 +1,3 @@
// tslint:disable:readonly-array no-submodule-imports
import { Producer, Stream } from "xstream";
import { concat } from "./concat";

View File

@ -1,4 +1,3 @@
// tslint:disable:readonly-array
import { Producer, Stream, Subscription } from "xstream";
/**
@ -31,7 +30,6 @@ export function concat<T>(...streams: Stream<T>[]): Stream<T> {
subscription.unsubscribe();
}
// tslint:disable-next-line:no-object-mutation
queues.length = 0;
completedStreams.clear();
activeStreamIndex = 0;

View File

@ -29,7 +29,6 @@ describe("DefaultValueProducer", () => {
const producer = new DefaultValueProducer(42);
const stream = Stream.createWithMemory(producer);
// tslint:disable-next-line:readonly-array
const events: number[] = [];
stream.addListener({
next: (value) => {
@ -68,7 +67,6 @@ describe("DefaultValueProducer", () => {
});
it("calls callbacks", async () => {
// tslint:disable-next-line:readonly-array
const producerActive: boolean[] = [];
const producer = new DefaultValueProducer(42, {

View File

@ -12,9 +12,7 @@ export class DefaultValueProducer<T> implements Producer<T> {
}
private readonly callbacks: DefaultValueProducerCallsbacks | undefined;
// tslint:disable-next-line:readonly-keyword
private internalValue: T;
// tslint:disable-next-line:readonly-keyword
private listener: Listener<T> | undefined;
public constructor(value: T, callbacks?: DefaultValueProducerCallsbacks) {
@ -29,7 +27,6 @@ export class DefaultValueProducer<T> implements Producer<T> {
* If not, just the current value is updated.
*/
public update(value: T): void {
// tslint:disable-next-line:no-object-mutation
this.internalValue = value;
if (this.listener) {
this.listener.next(value);
@ -49,7 +46,6 @@ export class DefaultValueProducer<T> implements Producer<T> {
* Called by the stream. Do not call this directly.
*/
public start(listener: Listener<T>): void {
// tslint:disable-next-line:no-object-mutation
this.listener = listener;
listener.next(this.internalValue);
@ -65,8 +61,6 @@ export class DefaultValueProducer<T> implements Producer<T> {
if (this.callbacks) {
this.callbacks.onStop();
}
// tslint:disable-next-line:no-object-mutation
this.listener = undefined;
}
}

View File

@ -1,5 +1,3 @@
// tslint:disable:readonly-array
import { Producer, Stream } from "xstream";
import { firstEvent, fromListPromise, toListPromise } from "./promise";

View File

@ -1,4 +1,3 @@
// tslint:disable:readonly-array
import { Stream } from "xstream";
import { asArray, countStream, lastValue } from "./reducer";

View File

@ -1,14 +1,3 @@
/*
This file maintains some stream helpers used in iov-bns, but which
may be useful other places, and should consider to be moved.
Reducer and related code works to maintain a current state
materialized by reducing all events on a stream. Similar
to ValueAndUpdate in keycontrol, but more general.
*/
// tslint:disable:readonly-keyword
// tslint:disable:no-object-mutation
import { Stream } from "xstream";
export type ReducerFunc<T, U> = (acc: U, evt: T) => U;

View File

@ -1,3 +0,0 @@
{
"extends": "../../tslint.json"
}