Using more granular interfaces adds to expressiveness of the code. Knowing what needs to mutate the state explicitly helps easier understanding of the code and therefore increases the maintainability.
19 lines
770 B
TypeScript
19 lines
770 B
TypeScript
import { IReadOnlyUserFilter, IUserFilter } from './Filter/IUserFilter';
|
|
import { IReadOnlyUserSelection, IUserSelection } from './Selection/IUserSelection';
|
|
import { IApplicationCode } from './Code/IApplicationCode';
|
|
import { ICategoryCollection } from '@/domain/ICategoryCollection';
|
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
|
|
|
export interface IReadOnlyCategoryCollectionState {
|
|
readonly code: IApplicationCode;
|
|
readonly os: OperatingSystem;
|
|
readonly filter: IReadOnlyUserFilter;
|
|
readonly selection: IReadOnlyUserSelection;
|
|
readonly collection: ICategoryCollection;
|
|
}
|
|
|
|
export interface ICategoryCollectionState extends IReadOnlyCategoryCollectionState {
|
|
readonly filter: IUserFilter;
|
|
readonly selection: IUserSelection;
|
|
}
|