import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants';
import { BlockedHit, GroupId } from '../types';
import { Set } from 'immutable';

export interface BlockHit {
  readonly type: BLOCK_HIT;
  readonly data: BlockedHit;
}

export interface UnblockHit {
  readonly type: UNBLOCK_HIT;
  readonly groupId: string;
}

export interface UnblockMultipleHits {
  readonly type: UNBLOCK_MULTIPLE_HITS;
  readonly groupIds: Set<GroupId>;
}

export type BlockHitAction = BlockHit | UnblockHit | UnblockMultipleHits;

export const blockHitGroup = (data: BlockedHit): BlockHit => ({
  type: BLOCK_HIT,
  data
});

export const unblockHitGroup = (groupId: string): UnblockHit => ({
  type: UNBLOCK_HIT,
  groupId
});

import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants';
import { BlockedHit } from '../types';
import { Set } from 'immutable';

export interface BlockHit {
  readonly type: BLOCK_HIT;
  readonly data: BlockedHit;
}

export interface UnblockHit {
  readonly type: UNBLOCK_HIT;
  readonly groupId: string;
}

export interface UnblockMultipleHits {
  readonly type: UNBLOCK_MULTIPLE_HITS;
  readonly groupIds: Set<string>;
}

export type BlockHitAction = BlockHit | UnblockHit | UnblockMultipleHits;

export const blockHitGroup = (data: BlockedHit): BlockHit => ({
  type: BLOCK_HIT,
  data
});

export const unblockHitGroup = (groupId: string): UnblockHit => ({
  type: UNBLOCK_HIT,
  groupId
});

--- 
+++ 
@@ -1,5 +1,5 @@
 import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants';
-import { BlockedHit } from '../types';
+import { BlockedHit, GroupId } from '../types';
 import { Set } from 'immutable';
 
 export interface BlockHit {
@@ -14,7 +14,7 @@
 
 export interface UnblockMultipleHits {
   readonly type: UNBLOCK_MULTIPLE_HITS;
-  readonly groupIds: Set<string>;
+  readonly groupIds: Set<GroupId>;
 }
 
 export type BlockHitAction = BlockHit | UnblockHit | UnblockMultipleHits;
Use more expressive type name for UnblockMultipleHits.
