<commit_before>import {
  Selector,
  ParametricSelector,
  OutputSelector,
  OutputParametricSelector
} from "reselect";

export as namespace ReselectMap;

type ObjectMap<T> = { [key: string]: T } | { [key: number]: T };

/* 1 selector */

export function createArraySelector<S, E, T>(
  selector1: Selector<S, E[]>,
  combiner: (elem: E) => T
): OutputSelector<S, T[], (elem: E) => T>;

export function createArraySelector<S, E, T>(
  selectors: [Selector<S, E[]>],
  combiner: (elem: E) => T
): OutputSelector<S, T[], (elem: E) => T>;

export function createArraySelector<S, P, E, T>(
  selector1: ParametricSelector<S, P, E[]>,
  combiner: (elem: E) => T
): OutputParametricSelector<S, P, T[], (elem: E) => T>;<commit_msg>Add typings for memoize functions<commit_after>import {
  Selector,
  ParametricSelector,
  OutputSelector,
  OutputParametricSelector
} from "reselect";

export as namespace ReselectMap;

type ObjectMap<T> = { [key: string]: T } | { [key: number]: T };

// Typings for memoize functions

export type MemoizeFunc = <F extends Function>(
  fn: F,
  equalityCheck?: <T>(a: T, b: T) => boolean
) => F;
export const arrayMemoize: MemoizeFunc;
export const objectMemoize: MemoizeFunc;
export const listMemoize: MemoizeFunc;
export const mapMemoize: MemoizeFunc;

/* 1 selector */

export function createArraySelector<S, E, T>(
  selector1: Selector<S, E[]>,
  combiner: (elem: E) => T
): OutputSelector<S, T[], (elem: E) => T>;

export function createArraySelector<S, E, T>(
  selectors: [Selector<S, E[]>],
  combiner: (elem: E) => T
): OutputSelector<S, T[], (elem: E) => T>;

export function createArraySelector<S, P, E, T>(
  selector1: ParametricSelector<S, P, E[]>,
  combiner: (elem: E) => T
): OutputParametricSelector<S, P, T[], (elem: E) => T>;
{'fraction_non_alphanumeric': 0.1684507042253521, 'fraction_numerical': 0.0033802816901408453, 'mean_word_length': 5.020338983050848, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 39, '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': '1493998', 'n_tokens_mistral': 629, 'n_tokens_neox': 633, 'n_words': 188}