Changeset View
Changeset View
Standalone View
Standalone View
lib/types/redux-types.js
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
} from './socket-types.js'; | } from './socket-types.js'; | ||||
import type { SubscriptionUpdateResult } from './subscription-types.js'; | import type { SubscriptionUpdateResult } from './subscription-types.js'; | ||||
import type { | import type { | ||||
ThreadStore, | ThreadStore, | ||||
ChangeThreadSettingsPayload, | ChangeThreadSettingsPayload, | ||||
LeaveThreadPayload, | LeaveThreadPayload, | ||||
NewThreadResult, | NewThreadResult, | ||||
ThreadJoinPayload, | ThreadJoinPayload, | ||||
ToggleMessagePinResult, | |||||
} from './thread-types.js'; | } from './thread-types.js'; | ||||
import type { ClientUpdatesResultWithUserInfos } from './update-types.js'; | import type { ClientUpdatesResultWithUserInfos } from './update-types.js'; | ||||
import type { CurrentUserInfo, UserStore } from './user-types.js'; | import type { CurrentUserInfo, UserStore } from './user-types.js'; | ||||
import type { Shape } from '../types/core.js'; | import type { Shape } from '../types/core.js'; | ||||
import type { NotifPermissionAlertInfo } from '../utils/push-alerts.js'; | import type { NotifPermissionAlertInfo } from '../utils/push-alerts.js'; | ||||
export type BaseAppState<NavInfo: BaseNavInfo> = { | export type BaseAppState<NavInfo: BaseNavInfo> = { | ||||
navInfo: NavInfo, | navInfo: NavInfo, | ||||
▲ Show 20 Lines • Show All 854 Lines • ▼ Show 20 Lines | | { | ||||
+payload: EditMessagePayload, | +payload: EditMessagePayload, | ||||
+loadingInfo: LoadingInfo, | +loadingInfo: LoadingInfo, | ||||
} | } | ||||
| { | | { | ||||
+type: 'SEND_EDIT_MESSAGE_FAILED', | +type: 'SEND_EDIT_MESSAGE_FAILED', | ||||
+error: true, | +error: true, | ||||
+payload: Error, | +payload: Error, | ||||
+loadingInfo: LoadingInfo, | +loadingInfo: LoadingInfo, | ||||
} | |||||
| { | |||||
+type: 'TOGGLE_MESSAGE_PIN_STARTED', | |||||
+loadingInfo?: LoadingInfo, | |||||
+payload?: void, | |||||
} | |||||
| { | |||||
+type: 'TOGGLE_MESSAGE_PIN_SUCCESS', | |||||
+payload: ToggleMessagePinResult, | |||||
+loadingInfo: LoadingInfo, | |||||
} | |||||
| { | |||||
+type: 'TOGGLE_MESSAGE_PIN_FAILED', | |||||
+error: true, | |||||
+payload: Error, | |||||
+loadingInfo: LoadingInfo, | |||||
}; | }; | ||||
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string); | export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string); | ||||
export type SuperAction = { | export type SuperAction = { | ||||
type: string, | type: string, | ||||
payload?: ActionPayload, | payload?: ActionPayload, | ||||
loadingInfo?: LoadingInfo, | loadingInfo?: LoadingInfo, | ||||
error?: boolean, | error?: boolean, | ||||
Show All 11 Lines |