<commit_before>import $$observable from 'symbol-observable';

const NO = {};
function noop() {}

function copy<T>(a: Array<T>): Array<T> {
  const l = a.length;
  const b = Array(l);
  for (let i = 0; i < l; ++i) {
    b[i] = a[i];
  }
  return b;
}

export interface InternalListener<T> {
  _n: (v: T) => void;
  _e: (err: any) => void;
  _c: () => void;
}

export const NO_IL: InternalListener<any> = {
  _n: noop,
  _e: noop,
  _c: noop,
};

export interface InternalProducer<T> {
  _start: (listener: InternalListener<T>) => void;
  _stop: () => void;
}

export interface OutSender<T> {
  out: Stream<T>;
}

export interface Operator<T, R> extends InternalProducer<R>, InternalListener<T>, OutSender<R> {
  type: string;
  ins: Stream<T>;
  _start: (out: Stream<R>) => void;
}

export interface Aggregator<T, U> extends InternalProducer<U>, OutSender<U> {
  type: string;
  insArr: Array<Stream<T>>;
  _start: (out: Stream<U>) => void;
}

export interface Producer<T> {
  start: (listener: Listener<T>) => void;
  stop: () => void;
}

export interface Listener<T> {
  next: (x: T) => void;
  error: (err: any) => void;
  complete: () => void;
}

export interface Subscription {
  unsubscribe(): void;
}

export interface Observable<T> {
  subscribe(listener: Listener<T>): Subscription;
};

export type FromInput<T> = Promise<T> | Stream<T> | Array<T> | Observable<T>;

// mutates the input
function internalizeProducer<T>(producer: Producer<T> & Partial<InternalProducer<T>>) {
  producer._start = function _start(il: InternalListener<T> & Partial<Listener<T>>) {
    il.next = il._n;
    il.error = il._e;
    il.complete = il._c;<commit_msg>fix(src): usage of TypeScript v2.1 is a breaking change<commit_after>import $$observable from 'symbol-observable';

const NO = {};
function noop() {}

function copy<T>(a: Array<T>): Array<T> {
  const l = a.length;
  const b = Array(l);
  for (let i = 0; i < l; ++i) {
    b[i] = a[i];
  }
  return b;
}

export interface InternalListener<T> {
  _n: (v: T) => void;
  _e: (err: any) => void;
  _c: () => void;
}

export const NO_IL: InternalListener<any> = {
  _n: noop,
  _e: noop,
  _c: noop,
};

export interface InternalProducer<T> {
  _start: (listener: InternalListener<T>) => void;
  _stop: () => void;
}

export interface Producer<T> {
  start: (listener: Listener<T>) => void;
  stop: () => void;
}

export interface Listener<T> {
  next: (x: T) => void;
  error: (err: any) => void;
  complete: () => void;
}

export interface OutSender<T> {
  out: Stream<T>;
}

export interface Operator<T, R> extends InternalProducer<R>, InternalListener<T>, OutSender<R> {
  type: string;
  ins: Stream<T>;
  _start: (out: Stream<R>) => void;
}

export interface Aggregator<T, U> extends InternalProducer<U>, OutSender<U> {
  type: string;
  insArr: Array<Stream<T>>;
  _start: (out: Stream<U>) => void;
}

export interface Subscription {
  unsubscribe(): void;
}

export interface Observable<T> {
  subscribe(listener: Listener<T>): Subscription;
};

export type FromInput<T> = Promise<T> | Stream<T> | Array<T> | Observable<T>;

// mutates the input
function internalizeProducer<T>(producer: Producer<T> & Partial<InternalProducer<T>>) {
  producer._start = function _start(il: InternalListener<T> & Partial<Listener<T>>) {
    il.next = il._n;
    il.error = il._e;
    il.complete = il._c;
{'fraction_non_alphanumeric': 0.1737567405632115, 'fraction_numerical': 0.0011983223487118035, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '445255', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1240, 'n_words': 317}