diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js --- a/keyserver/src/push/send.js +++ b/keyserver/src/push/send.js @@ -1157,7 +1157,7 @@ }; type APNsDelivery = { - +source: $PropertyType, + +source: NotificationInfo['source'], +deviceType: 'ios' | 'macos', +iosID: string, +deviceTokens: $ReadOnlyArray, @@ -1236,7 +1236,7 @@ type PushResult = AndroidResult | APNsResult | WebResult | WNSResult; type PushDelivery = AndroidDelivery | APNsDelivery | WebDelivery | WNSDelivery; type AndroidDelivery = { - source: $PropertyType, + source: NotificationInfo['source'], deviceType: 'android', androidIDs: $ReadOnlyArray, deviceTokens: $ReadOnlyArray, @@ -1288,7 +1288,7 @@ } type WebDelivery = { - +source: $PropertyType, + +source: NotificationInfo['source'], +deviceType: 'web', +deviceTokens: $ReadOnlyArray, +codeVersion?: number, @@ -1328,7 +1328,7 @@ } type WNSDelivery = { - +source: $PropertyType, + +source: NotificationInfo['source'], +deviceType: 'windows', +wnsIDs: $ReadOnlyArray, +deviceTokens: $ReadOnlyArray, diff --git a/lib/keyserver-conn/keyserver-call-infos.js b/lib/keyserver-conn/keyserver-call-infos.js --- a/lib/keyserver-conn/keyserver-call-infos.js +++ b/lib/keyserver-conn/keyserver-call-infos.js @@ -9,7 +9,7 @@ export type KeyserverInfoPartial = $ReadOnly<{ ...Partial, - +urlPrefix: $PropertyType, + +urlPrefix: KeyserverInfo['urlPrefix'], }>; export type KeyserverCallInfo = { diff --git a/lib/shared/message-utils.js b/lib/shared/message-utils.js --- a/lib/shared/message-utils.js +++ b/lib/shared/message-utils.js @@ -450,7 +450,7 @@ } function useMessageCreationSideEffectsFunc( - messageType: $PropertyType, + messageType: Info['type'], ): CreationSideEffectsFunc { const messageSpec = messageSpecs[messageType]; invariant(messageSpec, `we're not aware of messageType ${messageType}`); diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -339,7 +339,7 @@ function threadMembersWithoutAddedAdmin< T: LegacyRawThreadInfo | RawThreadInfo | ThreadInfo, ->(threadInfo: T): $PropertyType { +>(threadInfo: T): T['members'] { if (threadInfo.community !== genesis().id) { return threadInfo.members; } diff --git a/lib/socket/inflight-requests.js b/lib/socket/inflight-requests.js --- a/lib/socket/inflight-requests.js +++ b/lib/socket/inflight-requests.js @@ -27,7 +27,7 @@ e: APIResponseServerSocketMessage, }; type BaseInflightRequest = { - expectedResponseType: $PropertyType, + expectedResponseType: Response['type'], resolve: (response: Response) => void, reject: (error: Error) => void, messageID: number, @@ -60,7 +60,7 @@ async fetchResponse( messageID: number, - expectedType: $PropertyType, + expectedType: M['type'], ): Promise { let inflightRequest: ?InflightRequest; const responsePromise = new Promise((resolve, reject) => { diff --git a/lib/types/account-types.js b/lib/types/account-types.js --- a/lib/types/account-types.js +++ b/lib/types/account-types.js @@ -190,7 +190,7 @@ export type ClientLogInResponse = $ReadOnly<{ ...ServerLogInResponse, +cookieChange: $ReadOnly<{ - ...$PropertyType, + ...ServerLogInResponse['cookieChange'], threadInfos: RawThreadInfos, }>, }>; diff --git a/lib/types/report-types.js b/lib/types/report-types.js --- a/lib/types/report-types.js +++ b/lib/types/report-types.js @@ -73,7 +73,7 @@ }; export type ActionSummary = { - +type: $PropertyType, + +type: BaseAction['type'], +time: number, +summary: string, }; @@ -83,7 +83,7 @@ +action: BaseAction, +pollResult?: ?MixedRawThreadInfos, +pushResult: MixedRawThreadInfos, - +lastActionTypes?: ?$ReadOnlyArray<$PropertyType>, + +lastActionTypes?: ?$ReadOnlyArray, +lastActions?: ?$ReadOnlyArray, +time?: ?number, }; @@ -94,7 +94,7 @@ +calendarQuery: CalendarQuery, +pollResult?: ?{ +[id: string]: RawEntryInfo }, +pushResult: { +[id: string]: RawEntryInfo }, - +lastActionTypes?: ?$ReadOnlyArray<$PropertyType>, + +lastActionTypes?: ?$ReadOnlyArray, +lastActions?: ?$ReadOnlyArray, +time: number, }; @@ -245,7 +245,7 @@ +payload: $ReadOnlyArray, }; -const tActionType = t.irreducible<$PropertyType>( +const tActionType = t.irreducible( 'ActionType', x => typeof x === 'string', ); diff --git a/lib/utils/redux-promise-utils.js b/lib/utils/redux-promise-utils.js --- a/lib/utils/redux-promise-utils.js +++ b/lib/utils/redux-promise-utils.js @@ -71,14 +71,10 @@ SUCCESS: BaseAction, FAILED: BaseAction, >( - actionTypes: ActionTypes< - $PropertyType, - $PropertyType, - $PropertyType, - >, - promise: Promise<$PropertyType>, + actionTypes: ActionTypes, + promise: Promise, loadingOptions?: LoadingOptions, - startingPayload?: $PropertyType, + startingPayload?: STARTED['payload'], ) => Promise; function useDispatchActionPromise(): DispatchActionPromise { @@ -92,14 +88,10 @@ SUCCESS: BaseAction, FAILED: BaseAction, >( - actionTypes: ActionTypes< - $PropertyType, - $PropertyType, - $PropertyType, - >, - promise: Promise<$PropertyType>, + actionTypes: ActionTypes, + promise: Promise, loadingOptions?: LoadingOptions, - startingPayload?: $PropertyType, + startingPayload?: STARTED['payload'], ): Promise { return dispatch( wrapActionPromise(actionTypes, promise, loadingOptions, startingPayload), diff --git a/native/chat/compose-thread-button.react.js b/native/chat/compose-thread-button.react.js --- a/native/chat/compose-thread-button.react.js +++ b/native/chat/compose-thread-button.react.js @@ -14,7 +14,7 @@ import { useColors } from '../themes/colors.js'; type Props = { - +navigate: $PropertyType, 'navigate'>, + +navigate: ChatNavigationProp<'ChatThreadList'>['navigate'], }; function ComposeThreadButton(props: Props) { const { navigate } = props; 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 @@ -31,7 +31,7 @@ type BaseProps = { +threadInfo: ThreadInfo, - +navigate: $PropertyType, 'navigate'>, + +navigate: ChatNavigationProp<'MessageList'>['navigate'], +isSearchEmpty: boolean, +areSettingsEnabled: boolean, ...HeaderTitleInputProps, 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 @@ -123,10 +123,8 @@ +threadInfo: ThreadInfo, }; -export type ThreadSettingsNavigate = $PropertyType< - ChatNavigationProp<'ThreadSettings'>, - 'navigate', ->; +export type ThreadSettingsNavigate = + ChatNavigationProp<'ThreadSettings'>['navigate']; type ChatSettingsItem = | { 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 @@ -19,7 +19,7 @@ type BaseProps = { +threadInfo: ThreadInfo, - +navigate: $PropertyType, 'navigate'>, + +navigate: ChatNavigationProp<'MessageList'>['navigate'], }; type Props = { ...BaseProps, diff --git a/native/components/clearable-text-input.js b/native/components/clearable-text-input.js --- a/native/components/clearable-text-input.js +++ b/native/components/clearable-text-input.js @@ -7,6 +7,6 @@ export type ClearableTextInputProps = { ...TextInputProps, +textInputRef: (textInput: ?React.ElementRef) => mixed, - +onChangeText: $NonMaybeType<$PropertyType>, - +value: $NonMaybeType<$PropertyType>, + +onChangeText: $NonMaybeType, + +value: $NonMaybeType, }; diff --git a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js @@ -179,7 +179,7 @@ |}>; declare export type PressEvent = ResponderSyntheticEvent< $ReadOnly<{| - changedTouches: $ReadOnlyArray<$PropertyType>, + changedTouches: $ReadOnlyArray, force: number, identifier: number, locationX: number, @@ -188,7 +188,7 @@ pageY: number, target: ?number, timestamp: number, - touches: $ReadOnlyArray<$PropertyType>, + touches: $ReadOnlyArray, |}>, >; @@ -590,7 +590,7 @@ State: NavigationState, Action: GenericNavigationAction, > = {| - +type: $PropertyType, + +type: State['type'], +getInitialState: (options: RouterConfigOptions) => State, +getRehydratedState: ( partialState: PossiblyStaleNavigationState, @@ -782,20 +782,14 @@ EventMap: EventMapBase = EventMapCore, > = (e: EventArg< EventName, - $PropertyType< $ElementType< {| ...EventMap, ...EventMapCore |}, EventName, - >, - 'canPreventDefault', - >, - $PropertyType< + >['canPreventDefault'], $ElementType< {| ...EventMap, ...EventMapCore |}, EventName, - >, - 'data', - >, + >['data'], >) => mixed; /** @@ -1430,7 +1424,7 @@ +headerBackTitleStyle: TextStyleProp, +headerBackTitleVisible: boolean, +headerTruncatedBackTitle: string, - +headerBackImage: $PropertyType, + +headerBackImage: StackHeaderLeftButtonProps['backImage'], +headerBackAccessibilityLabel: string, |}>; diff --git a/native/flow-typed/npm/react-native-vision-camera_v3.x.x.js b/native/flow-typed/npm/react-native-vision-camera_v3.x.x.js --- a/native/flow-typed/npm/react-native-vision-camera_v3.x.x.js +++ b/native/flow-typed/npm/react-native-vision-camera_v3.x.x.js @@ -1668,8 +1668,8 @@ * Also make sure to memoize the returned object, so that the Camera doesn't reset the Frame Processor Context each time. */ declare export function createFrameProcessor( - frameProcessor: $PropertyType, - type: $PropertyType + frameProcessor: FrameProcessor["frameProcessor"], + type: FrameProcessor["type"] ): FrameProcessor; /** diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js --- a/native/navigation/overlay-navigator.react.js +++ b/native/navigation/overlay-navigator.react.js @@ -94,14 +94,14 @@ type SceneData = $ReadOnly<{ ...Scene, +context: $ReadOnly<{ - ...$PropertyType, + ...Scene['context'], +visibleOverlays: $ReadOnlyArray, +scrollBlockingModalStatus: ScrollBlockingModalStatus, +setScrollBlockingModalStatus: ScrollBlockingModalStatus => void, +resetScrollBlockingModalStatus: () => void, }>, +ordering: $ReadOnly<{ - ...$PropertyType, + ...Scene['ordering'], +creationTime: number, }>, }>; diff --git a/native/profile/relationship-list.react.js b/native/profile/relationship-list.react.js --- a/native/profile/relationship-list.react.js +++ b/native/profile/relationship-list.react.js @@ -43,10 +43,9 @@ const TagInput = createTagInput(); -export type RelationshipListNavigate = $PropertyType< - ProfileNavigationProp<'FriendList' | 'BlockList'>, - 'navigate', ->; +export type RelationshipListNavigate = ProfileNavigationProp< + 'FriendList' | 'BlockList', +>['navigate']; const tagInputProps = { placeholder: 'username', diff --git a/native/search/search-messages-button.react.js b/native/search/search-messages-button.react.js --- a/native/search/search-messages-button.react.js +++ b/native/search/search-messages-button.react.js @@ -12,7 +12,7 @@ type Props = { +threadInfo: ThreadInfo, - +navigate: $PropertyType, 'navigate'>, + +navigate: ChatNavigationProp<'MessageList'>['navigate'], }; function SearchMessagesButton(props: Props): React.Node { diff --git a/native/types/styles.js b/native/types/styles.js --- a/native/types/styles.js +++ b/native/types/styles.js @@ -12,13 +12,13 @@ import type { ViewStyleObj } from './react-native.js'; type ViewProps = React.ElementConfig; -export type ViewStyle = $PropertyType; +export type ViewStyle = ViewProps['style']; type TextProps = React.ElementConfig; -export type TextStyle = $PropertyType; +export type TextStyle = TextProps['style']; type ImageProps = React.ElementConfig; -export type ImageStyle = $PropertyType; +export type ImageStyle = ImageProps['style']; type Value = ?number | Animated.Node | SharedValue; diff --git a/web/flow-typed/npm/react-router-dom_v5.x.x.js b/web/flow-typed/npm/react-router-dom_v5.x.x.js --- a/web/flow-typed/npm/react-router-dom_v5.x.x.js +++ b/web/flow-typed/npm/react-router-dom_v5.x.x.js @@ -175,10 +175,10 @@ parent?: Match ): null | Match; - declare export function useHistory(): $PropertyType; - declare export function useLocation(): $PropertyType; - declare export function useParams(): $PropertyType<$PropertyType, 'params'>; - declare export function useRouteMatch(path?: MatchPathOptions | string | string[]): $PropertyType; + declare export function useHistory(): ContextRouter['history']; + declare export function useLocation(): ContextRouter['location']; + declare export function useParams(): ContextRouter['match']['params']; + declare export function useRouteMatch(path?: MatchPathOptions | string | string[]): ContextRouter['match']; declare export function generatePath(pattern?: string, params?: { +[string]: mixed, ... }): string; } diff --git a/web/flow-typed/npm/react-router_v5.x.x.js b/web/flow-typed/npm/react-router_v5.x.x.js --- a/web/flow-typed/npm/react-router_v5.x.x.js +++ b/web/flow-typed/npm/react-router_v5.x.x.js @@ -137,10 +137,10 @@ options?: MatchPathOptions | string | string[] ): null | Match; - declare export function useHistory(): $PropertyType; - declare export function useLocation(): $PropertyType; - declare export function useParams(): $PropertyType<$PropertyType, 'params'>; - declare export function useRouteMatch(path?: MatchPathOptions | string | string[]): $PropertyType; + declare export function useHistory(): ContextRouter['history']; + declare export function useLocation(): ContextRouter['location']; + declare export function useParams(): ContextRouter['match']['params']; + declare export function useRouteMatch(path?: MatchPathOptions | string | string[]): ContextRouter['match']; declare export function generatePath(pattern?: string, params?: {...}): string;