<commit_before>
import * as events from 'events';
import {reducer} from '../flux/reducer';
import * as _ from 'lodash';
import * as Immutable from 'immutable';

export interface IImmutableAppState {
  readonly exampleValue: number;
}

export interface IAppState extends IImmutableAppState {
  exampleValue: number;
}

export interface IStore {

  getState(): IImmutableAppState;
  getMutableState(): IAppState;
  updateState(state: IAppState): void;

}

export class Store
  implements IStore {


  private state: IAppState;

  public getState(): IImmutableAppState {
    let record = new (Immutable.Record(this.state) as any) as IImmutableAppState;
    return record;
  }

  public getMutableState(): IAppState {
    return this.state;
  }

  public updateState(newState: IAppState): void {
    this.state = newState;
  }

  constructor(initialState?: IAppState) {

    let defaultState: IAppState = {
      exampleValue: 1
    };

    this.updateState(initialState || defaultState);

  }

}<commit_msg>Added more basic state features<commit_after>
import * as events from 'events';
import {reducer} from '../flux/reducer';
import * as _ from 'lodash';
import * as Immutable from 'immutable';
import * as Model from '../api/models';


export interface IImmutableAppState {
  readonly exampleValue: number;
  readonly features: Model.IFeature[];
}

export interface IAppState extends IImmutableAppState {
  exampleValue: number;
  features: Model.IFeature[];
}

export interface IStore {

  getState(): IImmutableAppState;
  getMutableState(): IAppState;
  updateState(state: IAppState): void;

}

export class Store
  implements IStore {


  private state: IAppState;

  public getState(): IImmutableAppState {
    let record = new (Immutable.Record(this.state) as any) as IImmutableAppState;
    return record;
  }

  public getMutableState(): IAppState {
    return this.state;
  }

  public updateState(newState: IAppState): void {
    this.state = newState;
  }

  constructor(initialState?: IAppState) {

    let defaultState: IAppState = {
      exampleValue: 1,
      features: []
    };

    this.updateState(initialState || defaultState);

  }

}
{'fraction_non_alphanumeric': 0.10204081632653061, 'fraction_numerical': 0.0009276437847866419, 'mean_word_length': 4.027972027972028, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6770714', 'n_tokens_mistral': 680, 'n_tokens_neox': 653, 'n_words': 181}