Changeset View
Changeset View
Standalone View
Standalone View
lib/types/entry-types.js
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | export type EntryInfo = { | ||||
deleted: boolean, | deleted: boolean, | ||||
}; | }; | ||||
export type EntryStore = { | export type EntryStore = { | ||||
+entryInfos: { +[id: string]: RawEntryInfo }, | +entryInfos: { +[id: string]: RawEntryInfo }, | ||||
+daysToEntries: { +[day: string]: string[] }, | +daysToEntries: { +[day: string]: string[] }, | ||||
+lastUserInteractionCalendar: number, | +lastUserInteractionCalendar: number, | ||||
}; | }; | ||||
export const entryStoreValidator: TInterface<EntryStore> = tShape<EntryStore>({ | |||||
entryInfos: t.dict(tID, rawEntryInfoValidator), | |||||
daysToEntries: t.dict(t.String, t.list(tID)), | |||||
lastUserInteractionCalendar: t.Number, | |||||
}); | |||||
export type CalendarQuery = { | export type CalendarQuery = { | ||||
+startDate: string, | +startDate: string, | ||||
+endDate: string, | +endDate: string, | ||||
+filters: $ReadOnlyArray<CalendarFilter>, | +filters: $ReadOnlyArray<CalendarFilter>, | ||||
}; | }; | ||||
export const defaultCalendarQuery = ( | export const defaultCalendarQuery = ( | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |