import type { PayloadActionCreator } from '@reduxjs/toolkit' ; import { createAction } from '@reduxjs/toolkit' ; /**
 * Prefixes action creator types with a string
 */ export function actionNamespacer < Namespace extends string > ( namespace ) { return < Payload = never | void , Type extends string = string > ( type ) : PayloadActionCreator < Payload , `${ Namespace }/${ Type }` > => createAction ( `${ namespace }/${ type }` ) ; }