Changeset View
Changeset View
Standalone View
Standalone View
lib/types/redux-types.js
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | export type BaseAppState<NavInfo: BaseNavInfo> = { | ||||
connection: ConnectionInfo, | connection: ConnectionInfo, | ||||
watchedThreadIDs: $ReadOnlyArray<string>, | watchedThreadIDs: $ReadOnlyArray<string>, | ||||
lifecycleState: LifecycleState, | lifecycleState: LifecycleState, | ||||
enabledApps: EnabledApps, | enabledApps: EnabledApps, | ||||
reportStore: ReportStore, | reportStore: ReportStore, | ||||
nextLocalID: number, | nextLocalID: number, | ||||
dataLoaded: boolean, | dataLoaded: boolean, | ||||
userPolicies: UserPolicies, | userPolicies: UserPolicies, | ||||
deviceToken: ?string, | |||||
... | ... | ||||
}; | }; | ||||
// Web JS runtime doesn't have access to the cookie for security reasons. | // Web JS runtime doesn't have access to the cookie for security reasons. | ||||
// Native JS doesn't have a sessionID because the cookieID is used instead. | // Native JS doesn't have a sessionID because the cookieID is used instead. | ||||
// Web JS doesn't have a device token because it's not a device... | |||||
export type NativeAppState = BaseAppState<*> & { | export type NativeAppState = BaseAppState<*> & { | ||||
sessionID?: void, | sessionID?: void, | ||||
deviceToken: ?string, | |||||
cookie: ?string, | cookie: ?string, | ||||
... | ... | ||||
}; | }; | ||||
export type WebAppState = BaseAppState<*> & { | export type WebAppState = BaseAppState<*> & { | ||||
sessionID: ?string, | sessionID: ?string, | ||||
deviceToken?: void, | |||||
cookie?: void, | cookie?: void, | ||||
cryptoStore: CryptoStore, | cryptoStore: CryptoStore, | ||||
pushApiPublicKey: ?string, | pushApiPublicKey: ?string, | ||||
... | ... | ||||
}; | }; | ||||
export type AppState = NativeAppState | WebAppState; | export type AppState = NativeAppState | WebAppState; | ||||
export type BaseAction = | export type BaseAction = | ||||
▲ Show 20 Lines • Show All 804 Lines • Show Last 20 Lines |