pleroma/app/soapbox/entity-store/actions.ts
2022-12-04 17:05:01 -06:00

22 lines
No EOL
468 B
TypeScript

import type { Entity } from './types';
const ENTITIES_IMPORT = 'ENTITIES_IMPORT';
/** Action to import entities into the cache. */
function importEntities(entities: Entity[], entityType: string, listKey?: string) {
return {
type: ENTITIES_IMPORT,
entityType,
entities,
listKey,
};
}
/** Any action pertaining to entities. */
type EntityAction = ReturnType<typeof importEntities>;
export {
ENTITIES_IMPORT,
importEntities,
EntityAction,
};