<commit_before>import {Dispatch, Action} from 'redux';
import {ICounterState} from '../state/counter.state';

export const INCREMENT_COUNTER = 'INCREMENT_COUNTER';
export const DECREMENT_COUNTER = 'DECREMENT_COUNTER';

export function increment(): Action {
    return {type: INCREMENT_COUNTER};
}

export function decrement(): Action {
    return {type: DECREMENT_COUNTER};
}

export function incrementIfOdd() {
    return (dispatch:Dispatch<Action>, getState: ()=>ICounterState) => {
        const {counter} = getState();

        if(counter % 2 == 0) {
            return;
        }
        dispatch(increment());
    }
}

export function incrementAsync(delay = 1000) {
    return (dispatch:Dispatch<Action>):void => {
        setTimeout(() => dispatch(increment()), delay);
    }
}<commit_msg>Slight change to dispatch of actions<commit_after>import {Dispatch, Action} from 'redux';
import {ICounterState} from '../state/counter.state';

export const INCREMENT_COUNTER = 'INCREMENT_COUNTER';
export const DECREMENT_COUNTER = 'DECREMENT_COUNTER';

interface CounterAction extends Action {}

export function increment(): CounterAction {
    return {type: INCREMENT_COUNTER};
}

export function decrement(): CounterAction {
    return {type: DECREMENT_COUNTER};
}

export function incrementIfOdd() {
    return (dispatch:Dispatch<CounterAction>, getState: ()=>ICounterState) => {
        const {counter} = getState();

        if(counter % 2 == 0) {
            return;
        }

        dispatch(increment);
    }
}

export function incrementAsync(delay = 1000) {
    return (dispatch:Dispatch<Action>):void => {
        setTimeout(() => dispatch(increment), delay);
    }
}
{'fraction_non_alphanumeric': 0.13007159904534607, 'fraction_numerical': 0.007159904534606206, 'mean_word_length': 3.9178885630498534, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '3077656', 'n_tokens_mistral': 512, 'n_tokens_neox': 496, 'n_words': 119}