<commit_before>import { EpicMiddleware, combineEpics, createEpicMiddleware } from 'redux-observable';
const METADATA_KEY = 'redux-observable-decorator-metadata';

export interface EpicMetadata {
  propertyName: string;
}
export function Epic(): PropertyDecorator {
  return function (target: any, propertyName: string) {

    if (!(Reflect as any).hasOwnMetadata(METADATA_KEY, target)) {
      (Reflect as any).defineMetadata(METADATA_KEY, [], target);
    }

    const epics: EpicMetadata[] = (Reflect as any).getOwnMetadata(METADATA_KEY, target);
    const metadata: EpicMetadata = { propertyName };
    (Reflect as any).defineMetadata(METADATA_KEY, [...epics, metadata], target);
  };
}

export function getEpicsMetadata(instance: any): EpicMetadata[] {
  const target = Object.getPrototypeOf(instance);
  if (!(Reflect as any).hasOwnMetadata(METADATA_KEY, target)) {
    return [];
  }
  return (Reflect as any).getOwnMetadata(METADATA_KEY, target);

}

export function createEpics<T>(...instances: any[]): EpicMiddleware<T> {
  const epicsMetaData = instances
    .map(instance => getEpicsMetadata(instance)
      .map(({propertyName}) => instance[propertyName]));

  const epics = [].concat(...epicsMetaData);
  const rootEpic = combineEpics<T>(...epics);
  return createEpicMiddleware<T>(rootEpic);

}<commit_msg>Fixed to match redux-observable 0.13.0<commit_after>import { EpicMiddleware, combineEpics, createEpicMiddleware } from 'redux-observable';
const METADATA_KEY = 'redux-observable-decorator-metadata';

export interface EpicMetadata {
  propertyName: string;
}
export function Epic(): PropertyDecorator {
  return function (target: any, propertyName: string) {

    if (!(Reflect as any).hasOwnMetadata(METADATA_KEY, target)) {
      (Reflect as any).defineMetadata(METADATA_KEY, [], target);
    }

    const epics: EpicMetadata[] = (Reflect as any).getOwnMetadata(METADATA_KEY, target);
    const metadata: EpicMetadata = { propertyName };
    (Reflect as any).defineMetadata(METADATA_KEY, [...epics, metadata], target);
  };
}

export function getEpicsMetadata(instance: any): EpicMetadata[] {
  const target = Object.getPrototypeOf(instance);
  if (!(Reflect as any).hasOwnMetadata(METADATA_KEY, target)) {
    return [];
  }
  return (Reflect as any).getOwnMetadata(METADATA_KEY, target);

}

export function createEpics<T, S>(...instances: any[]): EpicMiddleware<T, S> {
  const epicsMetaData = instances
    .map(instance => getEpicsMetadata(instance)
      .map(({propertyName}) => instance[propertyName]));

  const epics = [].concat(...epicsMetaData);
  const rootEpic = combineEpics<T>(...epics);
  return createEpicMiddleware<T>(rootEpic);

}
{'fraction_non_alphanumeric': 0.13590415574691128, 'fraction_numerical': 0.001497566454511419, 'mean_word_length': 5.128440366972477, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '5592329', 'n_tokens_mistral': 859, 'n_tokens_neox': 827, 'n_words': 184}