type ActionType = ActionType.AddAlbum | ActionType.SetAlbums | ActionType.RemoveAlbum;
namespace ActionType {
interface Base {
type: ActionPointsType;
payload: unknown;
}
export interface AddAlbum extends Base {
type: 'type1';
payload: AlbumType;
}
export interface SetAlbums extends Base {
type: 'type2';
payload: AlbumType[];
}
export interface RemoveAlbum extends Base {
type: 'type3';
payload: number;
}
}