src/domain/task/store/appState.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { OrderedSet, OrderedMap } from 'immutable'
import type { Task } from '../entity/task'

export type AppState<T = string, I = string> = {
  readonly task: TaskState<T, I>
  readonly displayedTaskIds: OrderedSet<I>
}

export type TaskState<T = string, I = string> = {
  readonly byId: TaskById<I>
  readonly byType: TaskByType<T, I>
}

export type TaskById<I = string> = OrderedMap<I, Task>
export type TaskByType<T = string, I = string> = OrderedMap<T, OrderedSet<I>>