Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 106x 106x 106x 106x 92x 106x | import { createSelector } from "@ngrx/store"
import { FileSelectionState, FileState } from "../../../model/files/files"
import { filesSelector } from "../../store/files/files.selector"
type Selectable = Pick<FileState, "selectedAs">
type SelectableFile<File> = Selectable & { file: File }
export const _getReferenceFile = <File>(fileStates: SelectableFile<File>[]) =>
fileStates.find(file => file.selectedAs === FileSelectionState.Reference)?.file
export const referenceFileSelector = createSelector(filesSelector, _getReferenceFile)
|