diff --git a/lib/components/base-auto-join-community-handler.react.js b/lib/components/base-auto-join-community-handler.react.js --- a/lib/components/base-auto-join-community-handler.react.js +++ b/lib/components/base-auto-join-community-handler.react.js @@ -111,7 +111,7 @@ ); const promises: { - [string]: Promise>, + [string]: Promise>, } = {}; for (const channelID of followedFarcasterChannelIDs) { diff --git a/lib/keyserver-conn/keyserver-connections-handler.js b/lib/keyserver-conn/keyserver-connections-handler.js --- a/lib/keyserver-conn/keyserver-connections-handler.js +++ b/lib/keyserver-conn/keyserver-connections-handler.js @@ -6,7 +6,7 @@ import { type BaseSocketProps } from '../socket/socket.react.js'; import { useSelector } from '../utils/redux-utils.js'; -type BaseProps = $ReadOnly<$Diff>; +type BaseProps = $ReadOnly>; type Props = { ...BaseProps, diff --git a/lib/ops/keyserver-store-ops.js b/lib/ops/keyserver-store-ops.js --- a/lib/ops/keyserver-store-ops.js +++ b/lib/ops/keyserver-store-ops.js @@ -80,9 +80,9 @@ let persistedKeyserverInfo: PersistedKeyserverInfo; if (dbKeyserverInfo.keyserverInfo.length > 0) { - const persistedNonSyncedKeyserverInfo: $Diff< + const persistedNonSyncedKeyserverInfo: Omit< PersistedKeyserverInfo, - SyncedKeyserverInfoData, + $Keys, > = JSON.parse(dbKeyserverInfo.keyserverInfo); persistedKeyserverInfo = { diff --git a/lib/shared/transforms/keyserver-store-transform.js b/lib/shared/transforms/keyserver-store-transform.js --- a/lib/shared/transforms/keyserver-store-transform.js +++ b/lib/shared/transforms/keyserver-store-transform.js @@ -12,12 +12,9 @@ defaultConnectionInfo, } from '../../types/socket-types.js'; -export type PersistedKeyserverInfo = $Diff< +export type PersistedKeyserverInfo = Omit< KeyserverInfo, - { - +connection: ConnectionInfo, - +sessionID?: ?string, - }, + 'connection' | 'sessionID', >; export type PersistedKeyserverStore = { +keyserverInfos: { +[key: string]: PersistedKeyserverInfo }, diff --git a/lib/types/minimally-encoded-thread-permissions-types.js b/lib/types/minimally-encoded-thread-permissions-types.js --- a/lib/types/minimally-encoded-thread-permissions-types.js +++ b/lib/types/minimally-encoded-thread-permissions-types.js @@ -109,9 +109,9 @@ +permissions: string, }>; -export type MemberInfoSansPermissions = $Diff< +export type MemberInfoSansPermissions = Omit< MemberInfoWithPermissions, - { +permissions: string }, + 'permissions', >; export type MinimallyEncodedThickMemberInfo = $ReadOnly<{ @@ -143,13 +143,7 @@ >( minimallyEncodedMemberInfo: T, ): $ReadOnly<{ - ...$Diff< - T, - { - +minimallyEncoded: true, - +permissions: string, - }, - >, + ...Omit, +permissions: ThreadPermissionsInfo, }> => { const { minimallyEncoded, ...rest } = minimallyEncodedMemberInfo; diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js --- a/lib/types/socket-types.js +++ b/lib/types/socket-types.js @@ -143,9 +143,9 @@ | PingClientSocketMessage | AckUpdatesClientSocketMessage | APIRequestClientSocketMessage; -export type ClientSocketMessageWithoutID = $Diff< +export type ClientSocketMessageWithoutID = Omit< ClientClientSocketMessage, - { id: number }, + 'id', >; // The types of messages that the server sends across the socket diff --git a/native/components/tag-input.react.js b/native/components/tag-input.react.js --- a/native/components/tag-input.react.js +++ b/native/components/tag-input.react.js @@ -449,16 +449,11 @@ wrapper: {}, }); -type ReactConfigShim = $ReadOnly<{ - ...$Diff, - ...Partial, +type BaseConfig = $ReadOnly<{ + ...Omit, $Keys>, + ...Partial, }>; -type BaseConfig = ReactConfigShim< - TagInputProps, - typeof BaseTagInput.defaultProps, ->; - type TagInputComponentType = component( ref: React.RefSetter>, ...BaseConfig 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 @@ -1214,16 +1214,16 @@ declare export type TransitionSpec = | {| animation: 'spring', - config: $Diff< + config: Omit< SpringAnimationConfigSingle, - { toValue: number | AnimatedValue, ... }, + 'toValue', >, |} | {| animation: 'timing', - config: $Diff< + config: Omit< TimingAnimationConfigSingle, - { toValue: number | AnimatedValue, ... }, + 'toValue', >, |}; @@ -1516,9 +1516,9 @@ */ declare export type BottomTabBarButtonProps = {| - ...$Diff< + ...Omit< TouchableWithoutFeedbackProps, - {| onPress?: ?(event: PressEvent) => mixed |}, + 'onPress', >, +to?: string, +children: React.Node, @@ -1528,16 +1528,16 @@ declare export type TabBarVisibilityAnimationConfig = | {| +animation: 'spring', - +config?: $Diff< + +config?: Omit< SpringAnimationConfigSingle, - { toValue: number | AnimatedValue, useNativeDriver: boolean, ... }, + 'toValue' | 'useNativeDriver', >, |} | {| +animation: 'timing', - +config?: $Diff< + +config?: Omit< TimingAnimationConfigSingle, - { toValue: number | AnimatedValue, useNativeDriver: boolean, ... }, + 'toValue' | 'useNativeDriver', >, |}; diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -1399,10 +1399,7 @@ }, }; -type PersistedReportStore = $Diff< - ReportStore, - { +queuedReports: $ReadOnlyArray }, ->; +type PersistedReportStore = Omit; const reportStoreTransform: Transform = createTransform( (state: ReportStore): PersistedReportStore => { return { enabledReports: state.enabledReports }; diff --git a/native/types/styles.js b/native/types/styles.js --- a/native/types/styles.js +++ b/native/types/styles.js @@ -49,7 +49,7 @@ | AnimatedStyleObj | $ReadOnlyArray; const AnimatedView: React.ComponentType<{ - ...$Diff, + ...Omit, +style: AnimatedViewStyle, +entering?: ReanimatedAnimationBuilder | EntryAnimationFunction | Keyframe, +exiting?: ReanimatedAnimationBuilder | ExitAnimationFunction | Keyframe, @@ -59,7 +59,7 @@ | AnimatedStyleObj | $ReadOnlyArray; const AnimatedText: React.ComponentType<{ - ...$Diff, + ...Omit, +style: AnimatedTextStyle, }> = Animated.Text; @@ -67,7 +67,7 @@ | AnimatedStyleObj | $ReadOnlyArray; const AnimatedImage: React.ComponentType<{ - ...$Diff, + ...Omit, +style: AnimatedImageStyle, }> = Animated.Image; diff --git a/web/flow-typed/npm/react-color_v2.x.x.js b/web/flow-typed/npm/react-color_v2.x.x.js --- a/web/flow-typed/npm/react-color_v2.x.x.js +++ b/web/flow-typed/npm/react-color_v2.x.x.js @@ -171,7 +171,7 @@ Comp: ComponentType, >( Component: Comp - ): ComponentType<$Diff, InjectedColorProps>>; + ): ComponentType, $Keys>>; } declare module "react-color/lib/components/common" { diff --git a/web/flow-typed/npm/react-hot-loader_v4.6.x.js b/web/flow-typed/npm/react-hot-loader_v4.6.x.js --- a/web/flow-typed/npm/react-hot-loader_v4.6.x.js +++ b/web/flow-typed/npm/react-hot-loader_v4.6.x.js @@ -21,7 +21,7 @@ declare export function hot(module: Module): >( Component: T, - props?: $Diff, ... }> + props?: Omit ) => T declare export function cold>(component: T): T @@ -54,6 +54,6 @@ declare export function hot>( Component: T, - props?: $Diff, ... }> + props?: Omit ): T; } 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 @@ -159,7 +159,7 @@ declare export function withRouter>( WrappedComponent: Component - ): React.ComponentType<$Diff, ContextRouterVoid>>; + ): React.ComponentType, $Keys>>; declare type MatchPathOptions = { path?: string | string[],