Skip to content
Snippets Groups Projects
index.ts 582 B
Newer Older
  • Learn to ignore specific revisions
  • import { AsyncThunk } from '@reduxjs/toolkit';
    import { fetchDevicesThunk } from './device.subscription';
    import { fetchSelectedMneThunk } from './mne.subscription';
    
    
    export enum THUNK_TYPE {
        MNE =  'device/fetch',
        DEVICE =  'mne/fetch',
    }
    
    export interface SubscriptionThunkModule {
        thunkFn?: AsyncThunk<any, any, {}>
        type: THUNK_TYPE,
    }
    
    export const SubscriptionThunks: SubscriptionThunkModule[] = [
        {
            thunkFn: fetchDevicesThunk,
            type: THUNK_TYPE.DEVICE
        }, {
    
            thunkFn: fetchSelectedMneThunk,
            type: THUNK_TYPE.MNE
        }
    ]