<commit_before>import { createStore, Store, StoreEnhancer } from 'redux';
import { Component } from './components';
import { AppOptions, globalOptions, GlobalOptions } from './options';
import { IMap } from './types';
import { isPrimitive, log } from './utils';

// tslint:disable:ban-types

//
// internal
//

class VisitCounter {
    public value = 0;
}

export const DEFAULT_APP_NAME = 'default';

export const appsRepository: IMap<ReduxApp<any>> = {};

var appsCount = 0;

export type AppWarehouse = Map<Function, Map<any, any>>;

//
// public
//

export class ReduxApp<T extends object> {

    /**
     * Global redux-app options
     */
    public static options: GlobalOptions = globalOptions;

    public readonly name: string;
    /**
     * The root component of the application.
     */
    public readonly root: T;
    /**<commit_msg>add factory method (for typescript warnings...)<commit_after>import { createStore, Store, StoreEnhancer } from 'redux';
import { Component } from './components';
import { AppOptions, globalOptions, GlobalOptions } from './options';
import { IMap } from './types';
import { isPrimitive, log } from './utils';

// tslint:disable:ban-types

//
// internal
//

class VisitCounter {
    public value = 0;
}

export const DEFAULT_APP_NAME = 'default';

export const appsRepository: IMap<ReduxApp<any>> = {};

var appsCount = 0;

export type AppWarehouse = Map<Function, Map<any, any>>;

//
// public
//

export class ReduxApp<T extends object> {

    //
    // static
    //

    /**
     * Global redux-app options
     */
    public static options: GlobalOptions = globalOptions;

    public static createApp<T extends object>(appCreator: T, enhancer?: StoreEnhancer<T>): ReduxApp<T>;
    public static createApp<T extends object>(appCreator: T, options: AppOptions, enhancer?: StoreEnhancer<T>): ReduxApp<T>;
    public static createApp<T extends object>(appCreator: T, options: AppOptions, preloadedState: any, enhancer?: StoreEnhancer<T>): ReduxApp<T>;
    public static createApp<T extends object>(appCreator: T, ...params: any[]): ReduxApp<T> {
        return new ReduxApp(appCreator, ...params);
    }

    //
    // instance
    //

    public readonly name: string;
    /**
     * The root component of the application.
     */
    public readonly root: T;
    /**
{'fraction_non_alphanumeric': 0.13526361279170268, 'fraction_numerical': 0.001728608470181504, 'mean_word_length': 3.3190298507462686, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, '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': '1252337', 'n_tokens_mistral': 704, 'n_tokens_neox': 691, 'n_words': 207}