<commit_before>import difference from 'lodash/difference';
import union from 'lodash/union';
import isPlainObject from 'lodash/isPlainObject';
import $$observable from 'symbol-observable';
import {
  Action,
  Observable,
  PreloadedState,
  Reducer,
  Store,
  StoreEnhancer,
  StoreEnhancerStoreCreator,
} from 'redux';

export const ActionTypes = {
  PERFORM_ACTION: 'PERFORM_ACTION',
  RESET: 'RESET',
  ROLLBACK: 'ROLLBACK',
  COMMIT: 'COMMIT',
  SWEEP: 'SWEEP',
  TOGGLE_ACTION: 'TOGGLE_ACTION',
  SET_ACTIONS_ACTIVE: 'SET_ACTIONS_ACTIVE',
  JUMP_TO_STATE: 'JUMP_TO_STATE',
  JUMP_TO_ACTION: 'JUMP_TO_ACTION',
  REORDER_ACTION: 'REORDER_ACTION',
  IMPORT_STATE: 'IMPORT_STATE',
  LOCK_CHANGES: 'LOCK_CHANGES',
  PAUSE_RECORDING: 'PAUSE_RECORDING',
} as const;

const isChrome =
  typeof window === 'object' &&
  (typeof (window as typeof window & { chrome: unknown }).chrome !==
    'undefined' ||
    (typeof window.process !== 'undefined' &&
      (window.process as typeof window.process & { type: unknown }).type ===
        'renderer'));

const isChromeOrNode =
  isChrome ||
  (typeof process !== 'undefined' &&
    process.release &&
    process.release.name === 'node');

interface PerformAction<A extends Action<unknown>> {
  type: typeof ActionTypes.PERFORM_ACTION;
  action: A;
  timestamp: number;
  stack: string | undefined;
}

interface ResetAction {
  type: typeof ActionTypes.RESET;
  timestamp: number;
}

interface RollbackAction {
  type: typeof ActionTypes.ROLLBACK;
  timestamp: number;
}

interface CommitAction {<commit_msg>feat(redux-devtools-instrument): export type PerformAction (#614)<commit_after>import difference from 'lodash/difference';
import union from 'lodash/union';
import isPlainObject from 'lodash/isPlainObject';
import $$observable from 'symbol-observable';
import {
  Action,
  Observable,
  PreloadedState,
  Reducer,
  Store,
  StoreEnhancer,
  StoreEnhancerStoreCreator,
} from 'redux';

export const ActionTypes = {
  PERFORM_ACTION: 'PERFORM_ACTION',
  RESET: 'RESET',
  ROLLBACK: 'ROLLBACK',
  COMMIT: 'COMMIT',
  SWEEP: 'SWEEP',
  TOGGLE_ACTION: 'TOGGLE_ACTION',
  SET_ACTIONS_ACTIVE: 'SET_ACTIONS_ACTIVE',
  JUMP_TO_STATE: 'JUMP_TO_STATE',
  JUMP_TO_ACTION: 'JUMP_TO_ACTION',
  REORDER_ACTION: 'REORDER_ACTION',
  IMPORT_STATE: 'IMPORT_STATE',
  LOCK_CHANGES: 'LOCK_CHANGES',
  PAUSE_RECORDING: 'PAUSE_RECORDING',
} as const;

const isChrome =
  typeof window === 'object' &&
  (typeof (window as typeof window & { chrome: unknown }).chrome !==
    'undefined' ||
    (typeof window.process !== 'undefined' &&
      (window.process as typeof window.process & { type: unknown }).type ===
        'renderer'));

const isChromeOrNode =
  isChrome ||
  (typeof process !== 'undefined' &&
    process.release &&
    process.release.name === 'node');

export interface PerformAction<A extends Action<unknown>> {
  type: typeof ActionTypes.PERFORM_ACTION;
  action: A;
  timestamp: number;
  stack: string | undefined;
}

interface ResetAction {
  type: typeof ActionTypes.RESET;
  timestamp: number;
}

interface RollbackAction {
  type: typeof ActionTypes.ROLLBACK;
  timestamp: number;
}

interface CommitAction {
{'fraction_non_alphanumeric': 0.12377644458478054, 'fraction_numerical': 0.000947268708556994, 'mean_word_length': 4.845018450184502, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '974598', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1056, 'n_words': 247}