Вы можете написать функцию стрелки для передачи параметров при создании селектора.
export const getAlbumById = (collectionId: number) => createSelector(getAlbumEntities, entities => entities[collectionId]);
Еще пример
// effect
@Effect({ dispatch: true })
upsertAlbum$ = this.actions$.pipe(
ofType(AlbumActionTypes.UpsertAlbum),
map((action: any) => action.payload),
mergeMap(({ album }) =>
this.store.pipe(
select(selectAlbumIfExists(album.id)),
first(),
map(isAlbumHasName => [album, isAlbumHasName])
)
),
filter(([album, isAlbumHasName]) => !isAlbumHasName),
map(([album]) => new LoadAlbum({ album }))
);
// селектор
export const selectAlbumIfExists = (id: string) =>
createSelector(
selectAlbumsEntities,
entities => !!(entities[id] && entities[id].name)
);