import { Link } from "./types" ; export function addLink ( ) { return { type : "ADD_LINK" , } as const ; } export function updateLink ( index , link ) { return { type : "UPDATE_LINK" , data : { index , link } , } as const ; } export function removeLink ( index ) { return { type : "REMOVE_LINK" , data : { index } , } as const ; } export function reorderLink ( index , to ) { return { type : "REORDER_LINK" , data : { index , to } , } as const ; } export type Action = ReturnType < typeof addLink > | ReturnType < typeof updateLink > | ReturnType < typeof removeLink > | ReturnType < typeof reorderLink > ;