diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js --- a/native/account/logged-out-modal.react.js +++ b/native/account/logged-out-modal.react.js @@ -249,7 +249,7 @@ +loggedIn: boolean, +dimensions: DerivedDimensionsInfo, +splashStyle: ImageStyle, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatch: Dispatch, // Keyserver olm sessions functions diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js --- a/native/calendar/calendar.react.js +++ b/native/calendar/calendar.react.js @@ -174,7 +174,7 @@ +loadingStatus: LoadingStatus, +connectionStatus: ConnectionStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +indicatorStyle: IndicatorStyle, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js --- a/native/calendar/entry.react.js +++ b/native/calendar/entry.react.js @@ -200,7 +200,7 @@ // Redux state +calendarQuery: () => CalendarQuery, +online: boolean, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Nav state +threadPickerActive: boolean, +navigateToThread: (params: MessageListParams) => void, diff --git a/native/calendar/section-footer.react.js b/native/calendar/section-footer.react.js --- a/native/calendar/section-footer.react.js +++ b/native/calendar/section-footer.react.js @@ -45,7 +45,7 @@ type Props = { ...BaseProps, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class SectionFooter extends React.PureComponent { render(): React.Node { diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -289,7 +289,7 @@ +nextLocalID: string, +userInfos: UserInfos, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +onInputBarLayout?: (event: LayoutEvent) => mixed, +openCamera: () => mixed, +isActive: boolean, diff --git a/native/chat/failed-send.react.js b/native/chat/failed-send.react.js --- a/native/chat/failed-send.react.js +++ b/native/chat/failed-send.react.js @@ -44,7 +44,7 @@ type Props = { ...BaseProps, +rawMessageInfo: ?RawComposableMessageInfo, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +inputState: ?InputState, +parentThreadInfo: ?ThreadInfo, }; diff --git a/native/chat/message-list-container.react.js b/native/chat/message-list-container.react.js --- a/native/chat/message-list-container.react.js +++ b/native/chat/message-list-container.react.js @@ -93,7 +93,7 @@ +genesisThreadInfo: ?ThreadInfo | ?MinimallyEncodedThreadInfo, +messageListData: ?$ReadOnlyArray, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // withOverlayContext +overlayContext: ?OverlayContextType, +measureMessages: MessagesMeasurer, diff --git a/native/chat/message-list-header-title.react.js b/native/chat/message-list-header-title.react.js --- a/native/chat/message-list-header-title.react.js +++ b/native/chat/message-list-header-title.react.js @@ -39,7 +39,7 @@ }; type Props = { ...BaseProps, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +title: string, }; class MessageListHeaderTitle extends React.PureComponent { diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js --- a/native/chat/message-list.react.js +++ b/native/chat/message-list.react.js @@ -77,7 +77,7 @@ type Props = { ...BaseProps, +startReached: boolean, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +indicatorStyle: IndicatorStyle, +dispatchActionPromise: DispatchActionPromise, +fetchMessagesBeforeCursor: ( diff --git a/native/chat/settings/color-selector-modal.react.js b/native/chat/settings/color-selector-modal.react.js --- a/native/chat/settings/color-selector-modal.react.js +++ b/native/chat/settings/color-selector-modal.react.js @@ -70,7 +70,7 @@ ...BaseProps, // Redux state +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +windowWidth: number, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, diff --git a/native/chat/settings/compose-subchannel-modal.react.js b/native/chat/settings/compose-subchannel-modal.react.js --- a/native/chat/settings/compose-subchannel-modal.react.js +++ b/native/chat/settings/compose-subchannel-modal.react.js @@ -66,7 +66,7 @@ type Props = { ...BaseProps, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class ComposeSubchannelModal extends React.PureComponent { render(): React.Node { diff --git a/native/chat/settings/delete-thread.react.js b/native/chat/settings/delete-thread.react.js --- a/native/chat/settings/delete-thread.react.js +++ b/native/chat/settings/delete-thread.react.js @@ -122,7 +122,7 @@ +shouldUseDeleteConfirmationAlert: boolean, +loadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings-color.react.js b/native/chat/settings/thread-settings-color.react.js --- a/native/chat/settings/thread-settings-color.react.js +++ b/native/chat/settings/thread-settings-color.react.js @@ -51,7 +51,7 @@ // Redux state +loadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class ThreadSettingsColor extends React.PureComponent { render(): React.Node { diff --git a/native/chat/settings/thread-settings-description.react.js b/native/chat/settings/thread-settings-description.react.js --- a/native/chat/settings/thread-settings-description.react.js +++ b/native/chat/settings/thread-settings-description.react.js @@ -100,7 +100,7 @@ // Redux state +loadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings-home-notifs.react.js b/native/chat/settings/thread-settings-home-notifs.react.js --- a/native/chat/settings/thread-settings-home-notifs.react.js +++ b/native/chat/settings/thread-settings-home-notifs.react.js @@ -47,7 +47,7 @@ type Props = { ...BaseProps, // Redux state - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings-leave-thread.react.js b/native/chat/settings/thread-settings-leave-thread.react.js --- a/native/chat/settings/thread-settings-leave-thread.react.js +++ b/native/chat/settings/thread-settings-leave-thread.react.js @@ -58,7 +58,7 @@ +loadingStatus: LoadingStatus, +otherUsersButNoOtherAdmins: boolean, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings-list-action.react.js b/native/chat/settings/thread-settings-list-action.react.js --- a/native/chat/settings/thread-settings-list-action.react.js +++ b/native/chat/settings/thread-settings-list-action.react.js @@ -66,7 +66,7 @@ +iconSize: number, +iconStyle?: TextStyle, +buttonStyle?: ViewStyle, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; function ThreadSettingsListAction(props: ListActionProps) { return ( diff --git a/native/chat/settings/thread-settings-member.react.js b/native/chat/settings/thread-settings-member.react.js --- a/native/chat/settings/thread-settings-member.react.js +++ b/native/chat/settings/thread-settings-member.react.js @@ -109,7 +109,7 @@ +removeUserLoadingStatus: LoadingStatus, +changeRoleLoadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // withKeyboardState +keyboardState: ?KeyboardState, // withOverlayContext diff --git a/native/chat/settings/thread-settings-name.react.js b/native/chat/settings/thread-settings-name.react.js --- a/native/chat/settings/thread-settings-name.react.js +++ b/native/chat/settings/thread-settings-name.react.js @@ -72,7 +72,7 @@ // Redux state +loadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings-promote-sidebar.react.js b/native/chat/settings/thread-settings-promote-sidebar.react.js --- a/native/chat/settings/thread-settings-promote-sidebar.react.js +++ b/native/chat/settings/thread-settings-promote-sidebar.react.js @@ -38,7 +38,7 @@ ...BaseProps, +loadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +promoteSidebar: () => mixed, }; class ThreadSettingsPromoteSidebar extends React.PureComponent { diff --git a/native/chat/settings/thread-settings-push-notifs.react.js b/native/chat/settings/thread-settings-push-notifs.react.js --- a/native/chat/settings/thread-settings-push-notifs.react.js +++ b/native/chat/settings/thread-settings-push-notifs.react.js @@ -59,7 +59,7 @@ type Props = { ...BaseProps, // Redux state - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/chat/settings/thread-settings.react.js b/native/chat/settings/thread-settings.react.js --- a/native/chat/settings/thread-settings.react.js +++ b/native/chat/settings/thread-settings.react.js @@ -276,7 +276,7 @@ +parentThreadInfo: ?ResolvedThreadInfo | ?MinimallyEncodedResolvedThreadInfo, +childThreadInfos: ?$ReadOnlyArray, +somethingIsSaving: boolean, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +indicatorStyle: IndicatorStyle, // withOverlayContext +overlayContext: ?OverlayContextType, @@ -758,7 +758,7 @@ | ?ResolvedThreadInfo | ?MinimallyEncodedResolvedThreadInfo, navigate: ThreadSettingsNavigate, - styles: typeof unboundStyles, + styles: $ReadOnly, userInfos: UserInfos, viewerID: ?string, ) => { diff --git a/native/chat/thread-settings-button.react.js b/native/chat/thread-settings-button.react.js --- a/native/chat/thread-settings-button.react.js +++ b/native/chat/thread-settings-button.react.js @@ -24,7 +24,7 @@ }; type Props = { ...BaseProps, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class ThreadSettingsButton extends React.PureComponent { diff --git a/native/components/link-button.react.js b/native/components/link-button.react.js --- a/native/components/link-button.react.js +++ b/native/components/link-button.react.js @@ -26,7 +26,7 @@ }; type Props = { ...BaseProps, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class LinkButton extends React.PureComponent { render(): React.Node { diff --git a/native/components/thread-list-thread.react.js b/native/components/thread-list-thread.react.js --- a/native/components/thread-list-thread.react.js +++ b/native/components/thread-list-thread.react.js @@ -40,7 +40,7 @@ ...SharedProps, +threadInfo: ResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class ThreadListThread extends React.PureComponent { render(): React.Node { diff --git a/native/components/thread-list.react.js b/native/components/thread-list.react.js --- a/native/components/thread-list.react.js +++ b/native/components/thread-list.react.js @@ -35,7 +35,7 @@ type Props = { ...BaseProps, // Redux state - +styles: typeof unboundStyles, + +styles: $ReadOnly, +indicatorStyle: IndicatorStyle, }; type State = { diff --git a/native/components/user-list-user.react.js b/native/components/user-list-user.react.js --- a/native/components/user-list-user.react.js +++ b/native/components/user-list-user.react.js @@ -46,7 +46,7 @@ ...BaseProps, // Redux state +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; class UserListUser extends React.PureComponent { render(): React.Node { diff --git a/native/keyboard/keyboard-input-host.react.js b/native/keyboard/keyboard-input-host.react.js --- a/native/keyboard/keyboard-input-host.react.js +++ b/native/keyboard/keyboard-input-host.react.js @@ -29,7 +29,7 @@ type Props = { ...BaseProps, // Redux state - +styles: typeof unboundStyles, + +styles: $ReadOnly, +activeMessageList: ?string, // withKeyboardState +keyboardState: KeyboardState, diff --git a/native/media/media-gallery-keyboard.react.js b/native/media/media-gallery-keyboard.react.js --- a/native/media/media-gallery-keyboard.react.js +++ b/native/media/media-gallery-keyboard.react.js @@ -111,7 +111,7 @@ +dimensions: DimensionsInfo, +foreground: boolean, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, }; type State = { +selections: ?$ReadOnlyArray, diff --git a/native/profile/appearance-preferences.react.js b/native/profile/appearance-preferences.react.js --- a/native/profile/appearance-preferences.react.js +++ b/native/profile/appearance-preferences.react.js @@ -89,7 +89,7 @@ +route: NavigationRoute<'AppearancePreferences'>, +globalThemeInfo: GlobalThemeInfo, +updateThemePreference: (themePreference: GlobalThemePreference) => mixed, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +colors: Colors, }; class AppearancePreferences extends React.PureComponent { diff --git a/native/profile/custom-server-modal.react.js b/native/profile/custom-server-modal.react.js --- a/native/profile/custom-server-modal.react.js +++ b/native/profile/custom-server-modal.react.js @@ -62,7 +62,7 @@ ...BaseProps, +urlPrefix: string, +customServer: ?string, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +dispatch: Dispatch, }; type State = { diff --git a/native/profile/default-notifications-preferences.react.js b/native/profile/default-notifications-preferences.react.js --- a/native/profile/default-notifications-preferences.react.js +++ b/native/profile/default-notifications-preferences.react.js @@ -89,7 +89,7 @@ type Props = { ...BaseProps, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +dispatchActionPromise: DispatchActionPromise, +changeNotificationSettings: ( notificationSettingsRequest: UpdateUserSettingsRequest, diff --git a/native/profile/dev-tools.react.js b/native/profile/dev-tools.react.js --- a/native/profile/dev-tools.react.js +++ b/native/profile/dev-tools.react.js @@ -98,7 +98,7 @@ +urlPrefix: string, +customServer: ?string, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +dispatch: Dispatch, }; class DevTools extends React.PureComponent { diff --git a/native/profile/edit-password.react.js b/native/profile/edit-password.react.js --- a/native/profile/edit-password.react.js +++ b/native/profile/edit-password.react.js @@ -99,7 +99,7 @@ +loadingStatus: LoadingStatus, +username: ?string, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js --- a/native/profile/profile-screen.react.js +++ b/native/profile/profile-screen.react.js @@ -153,7 +153,7 @@ +preRequestUserState: PreRequestUserState, +logOutLoading: boolean, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +dispatchActionPromise: DispatchActionPromise, +logOut: (preRequestUserState: PreRequestUserState) => Promise, +staffCanSee: boolean, diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js --- a/native/profile/relationship-list-item.react.js +++ b/native/profile/relationship-list-item.react.js @@ -105,7 +105,7 @@ // Redux state +removeUserLoadingStatus: LoadingStatus, +colors: Colors, - +styles: typeof unboundStyles, + +styles: $ReadOnly, // Redux dispatch functions +dispatchActionPromise: DispatchActionPromise, // async functions that hit server APIs diff --git a/native/themes/colors.js b/native/themes/colors.js --- a/native/themes/colors.js +++ b/native/themes/colors.js @@ -277,7 +277,7 @@ type Styles = { [name: string]: { [field: string]: mixed } }; type ReplaceField = (input: any) => any; -export type StyleSheetOf = $ObjMap; +export type StyleSheetOf = $ReadOnly<$ObjMap>; function stylesFromColors( obj: IS, diff --git a/native/tooltip/tooltip.react.js b/native/tooltip/tooltip.react.js --- a/native/tooltip/tooltip.react.js +++ b/native/tooltip/tooltip.react.js @@ -147,7 +147,7 @@ +dimensions: DimensionsInfo, +overlayContext: ?OverlayContextType, +chatContext: ?ChatContextType, - +styles: typeof unboundStyles, + +styles: $ReadOnly, +tooltipContext: TooltipContextType, +closeTooltip: () => mixed, +boundTooltipItem: React.ComponentType,