<commit_before>import {isArray, isObject, isUndefined, mapValues, omitBy} from "lodash";
import {asReference, isObservableArray, observable, IObservableArray, action, isAction} from "mobx";

import {Entity, EntityField, EntityList} from "./types";

export interface Setter<T> {
    set(config: T): void;
}

export interface Clearer {
    clear(): void;
}

export interface ClearSet<T> extends Setter<T>, Clearer {}

export type EntityArray<T> = IObservableArray<T> & {$entity: Entity} & Setter<{}>;
function isEntityArray(data: StoreTypes): data is EntityArray<any> {<commit_msg>Ajout type setter entityarray<commit_after>import {isArray, isObject, isUndefined, mapValues, omitBy} from "lodash";
import {asReference, isObservableArray, observable, IObservableArray, action, isAction} from "mobx";

import {Entity, EntityField, EntityList} from "./types";

export interface Setter<T> {
    set(config: T): void;
}

export interface Clearer {
    clear(): void;
}

export interface ClearSet<T> extends Setter<T>, Clearer {}

export type EntityArray<T> = IObservableArray<T> & {$entity: Entity} & Setter<T[]>;
function isEntityArray(data: StoreTypes): data is EntityArray<any> {
{'fraction_non_alphanumeric': 0.12936170212765957, 'fraction_numerical': 0.0, 'mean_word_length': 6.538461538461538, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3351140', 'n_tokens_mistral': 369, 'n_tokens_neox': 364, 'n_words': 109}