All files / src/background/redux/actions filesystem.ts

62.5% Statements 5/8
100% Branches 0/0
25% Functions 1/4
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22      2x         2x         2x       2x        
import {FsEntity} from "../../api/filesystemTypes";
import {ADD_TO_SELECTED, AddToSelected, CLEAR_SELECTED, ClearSelected, REMOVE_FROM_SELECTED, RemoveFromSelected, REPLACE_SELECTED, ReplaceSelected} from "./filesystemTypes";
 
export const addToSelected = (content: FsEntity): AddToSelected => ({
    type: ADD_TO_SELECTED,
    payload: content,
})
 
export const removeFromSelected = (content: FsEntity): RemoveFromSelected => ({
    type: REMOVE_FROM_SELECTED,
    payload: content,
})
 
export const clearSelected = (): ClearSelected => ({
    type: CLEAR_SELECTED,
})
 
export const replaceSelected = (content: FsEntity[]): ReplaceSelected => ({
    type: REPLACE_SELECTED,
    payload: content,
})