diff --git a/keyserver/src/deleters/thread-deleters.js b/keyserver/src/deleters/thread-deleters.js --- a/keyserver/src/deleters/thread-deleters.js +++ b/keyserver/src/deleters/thread-deleters.js @@ -20,7 +20,7 @@ import { rescindPushNotifs } from '../push/rescind.js'; import type { Viewer } from '../session/viewer.js'; -type DeleteThreadOptions = $Shape<{ +type DeleteThreadOptions = Partial<{ +ignorePermissions: boolean, }>; async function deleteThread( diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js --- a/keyserver/src/fetchers/thread-fetchers.js +++ b/keyserver/src/fetchers/thread-fetchers.js @@ -25,7 +25,7 @@ import type { SQLStatementType } from '../database/types.js'; import type { Viewer } from '../session/viewer.js'; -type FetchThreadInfosFilter = $Shape<{ +type FetchThreadInfosFilter = Partial<{ +accessibleToUserID: string, +threadID: string, +threadIDs: $ReadOnlySet, diff --git a/keyserver/src/updaters/thread-permission-updaters.js b/keyserver/src/updaters/thread-permission-updaters.js --- a/keyserver/src/updaters/thread-permission-updaters.js +++ b/keyserver/src/updaters/thread-permission-updaters.js @@ -569,7 +569,7 @@ return { membershipRows, relationshipChangeset }; } -type DescendantUserInfo = $Shape<{ +type DescendantUserInfo = Partial<{ curRole?: string, curRolePermissions?: ?ThreadRolePermissionsBlob, curPermissions?: ?ThreadPermissionsBlob, diff --git a/lib/shared/version-utils.js b/lib/shared/version-utils.js --- a/lib/shared/version-utils.js +++ b/lib/shared/version-utils.js @@ -16,7 +16,7 @@ function hasMinCodeVersion( platformDetails: ?PlatformDetails, - minCodeVersion: $Shape<{ +native: number, +web: number }>, + minCodeVersion: Partial<{ +native: number, +web: number }>, ): boolean { if (!platformDetails) { return true; @@ -38,7 +38,7 @@ function hasMinStateVersion( platformDetails: ?PlatformDetails, - minStateVersion: $Shape<{ +native: number, +web: number }>, + minStateVersion: Partial<{ +native: number, +web: number }>, ): boolean { if (!platformDetails) { return true; diff --git a/lib/types/relationship-types.js b/lib/types/relationship-types.js --- a/lib/types/relationship-types.js +++ b/lib/types/relationship-types.js @@ -70,7 +70,7 @@ status: UndirectedStatus, }; -export type RelationshipErrors = $Shape<{ +export type RelationshipErrors = Partial<{ invalid_user: string[], already_friends: string[], user_blocked: string[], diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js --- a/lib/utils/action-utils.js +++ b/lib/utils/action-utils.js @@ -488,7 +488,7 @@ function useServerCall( serverCall: ActionFunc, - paramOverride?: ?$Shape, + paramOverride?: ?Partial, ): F { const dispatch = useDispatch(); const serverCallState = useSelector( diff --git a/lib/utils/keyserver-call.js b/lib/utils/keyserver-call.js --- a/lib/utils/keyserver-call.js +++ b/lib/utils/keyserver-call.js @@ -147,7 +147,7 @@ }, ); -export type KeyserverCallParamOverride = $Shape; +export type KeyserverCallParamOverride = Partial; function useKeyserverCall( keyserverCall: ActionFunc, 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 @@ -284,7 +284,7 @@ // Mostly due to Flow typing requirements... const setLogInState = setStateForContainer( this.guardedSetState, - (change: $Shape) => (fullState: State) => ({ + (change: Partial) => (fullState: State) => ({ logInState: { ...fullState.logInState, state: { ...fullState.logInState.state, ...change }, diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js --- a/native/account/siwe-panel.react.js +++ b/native/account/siwe-panel.react.js @@ -47,7 +47,7 @@ +onSuccessfulWalletSignature: SIWEResult => mixed, +closing: boolean, +setLoading: boolean => mixed, - +keyserverCallParamOverride?: $Shape, + +keyserverCallParamOverride?: Partial, }; function SIWEPanel(props: Props): React.Node { const dispatchActionPromise = useDispatchActionPromise(); diff --git a/native/chat/chat-thread-list-search.react.js b/native/chat/chat-thread-list-search.react.js --- a/native/chat/chat-thread-list-search.react.js +++ b/native/chat/chat-thread-list-search.react.js @@ -21,7 +21,7 @@ +searchText: string, +onChangeText: (updatedSearchText: string) => mixed, +onBlur: () => mixed, - +additionalProps?: $Shape>, + +additionalProps?: Partial>, +onSearchCancel: () => mixed, +searchStatus: SearchStatus, +innerSearchAutoFocus?: boolean, diff --git a/native/utils/state-container.js b/native/utils/state-container.js --- a/native/utils/state-container.js +++ b/native/utils/state-container.js @@ -1,11 +1,11 @@ // @flow export type SimpleStateSetter = ( - newState: $Shape, + newState: Partial, callback?: () => mixed, ) => void; -export type StateChange = $Shape | (S => $Shape); +export type StateChange = Partial | (S => Partial); type StateSetter = ( newState: StateChange, callback?: () => mixed, @@ -18,9 +18,9 @@ function setStateForContainer( setState: StateSetter, - reverseSelector: (ourChange: $Shape) => StateChange, + reverseSelector: (ourChange: Partial) => StateChange, ): SimpleStateSetter { - return (ourChange: $Shape, callback?: () => mixed) => + return (ourChange: Partial, callback?: () => mixed) => setState(reverseSelector(ourChange), callback); } diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -1452,7 +1452,7 @@ }); } - setTypeaheadState = (newState: $Shape) => { + setTypeaheadState = (newState: Partial) => { this.setState(prevState => ({ typeaheadState: { ...prevState.typeaheadState, diff --git a/web/input/input-state.js b/web/input/input-state.js --- a/web/input/input-state.js +++ b/web/input/input-state.js @@ -98,7 +98,7 @@ export type TypeaheadInputState = { +typeaheadState: TypeaheadState, - +setTypeaheadState: ($Shape) => void, + +setTypeaheadState: (Partial) => void, }; // This type represents the input state for a particular thread