import { EntityMetadata, matchActionTypeEntity } from '../Redux/EntityMetadata'; import { EntityName } from '../ValueObject/EntityName'; export interface GatewayAction { type: string; metadata: Metadata; gate: T; } export function isGatewayAction(action: unknown, type: (entity: EntityName) => string): action is GatewayAction { return matchActionTypeEntity(action, type); }