diff --git a/flow-typed/npm/@floating-ui/react_v0.26.x.js b/flow-typed/npm/@floating-ui/react_v0.26.x.js index 8662b7ce511..f4e9902bce4 100644 --- a/flow-typed/npm/@floating-ui/react_v0.26.x.js +++ b/flow-typed/npm/@floating-ui/react_v0.26.x.js @@ -310,7 +310,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingFocusManager: - React.AbstractComponent; + component(...FloatingFocusManagerProps); /* * FloatingNode @@ -321,7 +321,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingNode: - React.AbstractComponent; + component(...FloatingNodeProps); /* * FloatingOverlay @@ -334,7 +334,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingOverlay: - React.AbstractComponent; + component(...FloatingOverlayProps); /* * FloatingPortal @@ -345,7 +345,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingPortal: - React.AbstractComponent; + component(...FloatingPortalProps); /* * FloatingTree @@ -355,5 +355,5 @@ declare module '@floating-ui/react' { }; declare export const FloatingTree: - React.AbstractComponent; + component(...FloatingTreeProps); } diff --git a/flow-typed/npm/react-table_v7.x.x.js b/flow-typed/npm/react-table_v7.x.x.js index 040f9045b08..57c5b0435c3 100644 --- a/flow-typed/npm/react-table_v7.x.x.js +++ b/flow-typed/npm/react-table_v7.x.x.js @@ -22,7 +22,7 @@ declare module 'react-table' { * `D` contravariant above. */ +accessor?: (D) => V, - +Cell?: React.AbstractComponent, mixed>, + +Cell?: component(...CellRenderProps), +Header?: React.ComponentType | React.Node, +id?: string, ... @@ -30,7 +30,7 @@ declare module 'react-table' { declare export type ColumnOptionsNoValue<-D> = { +accessor?: (D) => mixed, - +Cell?: React.AbstractComponent, mixed>, + +Cell?: component(...CellRenderProps), +Header?: React.ComponentType | React.Node, +id?: string, ... diff --git a/package.json b/package.json index 5ed66538ef8..4dd624c013e 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-simple-import-sort": "^7.0.0", - "flow-bin": "0.250.0", + "flow-bin": "0.256.0", "gettext-parser": "4.2.0", "globals": "15.9.0", "hermes-eslint": "0.23.0", diff --git a/root/static/scripts/account/components/ApplicationForm.js b/root/static/scripts/account/components/ApplicationForm.js index be0eb28ffd0..29fdda81ddb 100644 --- a/root/static/scripts/account/components/ApplicationForm.js +++ b/root/static/scripts/account/components/ApplicationForm.js @@ -126,4 +126,4 @@ export type ApplicationFormPropsT = Props; export default (hydrate( 'div.application-form', ApplicationForm, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/account/components/EditProfileForm.js b/root/static/scripts/account/components/EditProfileForm.js index 94c9e9c7ca2..66ebb6bc3af 100644 --- a/root/static/scripts/account/components/EditProfileForm.js +++ b/root/static/scripts/account/components/EditProfileForm.js @@ -354,5 +354,5 @@ export type EditProfileFormPropsT = Props; export default ( hydrate('div.edit-profile-form', EditProfileForm): - React.AbstractComponent + React.ComponentType ); diff --git a/root/static/scripts/account/components/PreferencesForm.js b/root/static/scripts/account/components/PreferencesForm.js index 00ae0bd822a..213f8a5acc5 100644 --- a/root/static/scripts/account/components/PreferencesForm.js +++ b/root/static/scripts/account/components/PreferencesForm.js @@ -287,4 +287,4 @@ export type PreferencesFormPropsT = Props; export default (hydrate( 'div.preferences-form', PreferencesForm, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/account/components/RegisterForm.js b/root/static/scripts/account/components/RegisterForm.js index dcbf80a4b4b..488f27f074b 100644 --- a/root/static/scripts/account/components/RegisterForm.js +++ b/root/static/scripts/account/components/RegisterForm.js @@ -122,4 +122,4 @@ component RegisterForm(captcha?: string, form: RegisterFormT) { export default (hydrate>( 'div.register-form', RegisterForm, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/alias/AliasEditForm.js b/root/static/scripts/alias/AliasEditForm.js index a5c7d623f03..b7d53bc3c30 100644 --- a/root/static/scripts/alias/AliasEditForm.js +++ b/root/static/scripts/alias/AliasEditForm.js @@ -355,4 +355,4 @@ const AliasEditForm = ({ export default (hydrate( 'div.alias-edit-form', AliasEditForm, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/annotation/AnnotationHistoryTable.js b/root/static/scripts/annotation/AnnotationHistoryTable.js index 0b616776027..363cafdc143 100644 --- a/root/static/scripts/annotation/AnnotationHistoryTable.js +++ b/root/static/scripts/annotation/AnnotationHistoryTable.js @@ -159,4 +159,4 @@ component AnnotationHistoryTable( export default (hydrate>( 'div.annotation-history-table', AnnotationHistoryTable, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/artist/components/ArtistCreditRenamer.js b/root/static/scripts/artist/components/ArtistCreditRenamer.js index 8bedeffc0ff..5aee40f2a65 100644 --- a/root/static/scripts/artist/components/ArtistCreditRenamer.js +++ b/root/static/scripts/artist/components/ArtistCreditRenamer.js @@ -332,4 +332,4 @@ const ArtistCreditRenamer = ({ export default (hydrate( 'div.artist-credit-renamer', ArtistCreditRenamer, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/collection/components/CollectionEditForm.js b/root/static/scripts/collection/components/CollectionEditForm.js index de645513ff8..293bf4d8ba7 100644 --- a/root/static/scripts/collection/components/CollectionEditForm.js +++ b/root/static/scripts/collection/components/CollectionEditForm.js @@ -293,7 +293,7 @@ const CollaboratorsFormList = (hydrate( ); }), -): React.AbstractComponent); +): React.ComponentType); type CollaboratorRowPropsT = { +collaborator: CollaboratorStateT, diff --git a/root/static/scripts/common/components/AcoustIdCell.js b/root/static/scripts/common/components/AcoustIdCell.js index 81a24cf0190..00d86f7ba05 100644 --- a/root/static/scripts/common/components/AcoustIdCell.js +++ b/root/static/scripts/common/components/AcoustIdCell.js @@ -134,5 +134,5 @@ export default ( hydrate>( 'div.acoustids', AcoustIdCell, - ): React.AbstractComponent> + ): React.ComponentType> ); diff --git a/root/static/scripts/common/components/Annotation.js b/root/static/scripts/common/components/Annotation.js index 57cb542ecb1..5138ccc9055 100644 --- a/root/static/scripts/common/components/Annotation.js +++ b/root/static/scripts/common/components/Annotation.js @@ -141,4 +141,4 @@ export default (hydrate>( newProps.entity = newEntity; return newProps; }, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/ArtistCreditLink.js b/root/static/scripts/common/components/ArtistCreditLink.js index 89bac56eea6..5e4322d4611 100644 --- a/root/static/scripts/common/components/ArtistCreditLink.js +++ b/root/static/scripts/common/components/ArtistCreditLink.js @@ -48,7 +48,7 @@ component _MpIcon(artistCredit: ArtistCreditT) { export const MpIcon = (hydrate>( 'span.ac-mp', _MpIcon, -): React.AbstractComponent>); +): React.ComponentType>); component ArtistCreditLink( artistCredit: ArtistCreditT, diff --git a/root/static/scripts/common/components/ArtistRoles.js b/root/static/scripts/common/components/ArtistRoles.js index a9dcb795afc..ff763cbf668 100644 --- a/root/static/scripts/common/components/ArtistRoles.js +++ b/root/static/scripts/common/components/ArtistRoles.js @@ -53,4 +53,4 @@ component ArtistRoles(relations: $ReadOnlyArray) { export default (hydrate>( 'div.artist-roles-container', ArtistRoles, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/AttributeList.js b/root/static/scripts/common/components/AttributeList.js index 48293c1d66b..9277869fa0d 100644 --- a/root/static/scripts/common/components/AttributeList.js +++ b/root/static/scripts/common/components/AttributeList.js @@ -73,4 +73,4 @@ component AttributeList( export default (hydrate>( 'div.entity-attributes-container', AttributeList, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/Autocomplete2.js b/root/static/scripts/common/components/Autocomplete2.js index 9165d295c2e..e847d5b8b27 100644 --- a/root/static/scripts/common/components/Autocomplete2.js +++ b/root/static/scripts/common/components/Autocomplete2.js @@ -864,13 +864,13 @@ component _Autocomplete2(...props: PropsT) { } // $FlowIgnore[unclear-type] -const Autocomplete2: React.AbstractComponent, mixed> = +const Autocomplete2: React.ComponentType> = React.memo(_Autocomplete2); export default Autocomplete2; // XXX Until Flow supports https://github.com/facebook/flow/issues/7672 export const ArtistAutocomplete: - React.AbstractComponent, void> = + React.ComponentType> = // $FlowIgnore[unclear-type] (Autocomplete2: any); diff --git a/root/static/scripts/common/components/CommonsImage.js b/root/static/scripts/common/components/CommonsImage.js index 289623eef71..1aa8b9037be 100644 --- a/root/static/scripts/common/components/CommonsImage.js +++ b/root/static/scripts/common/components/CommonsImage.js @@ -56,4 +56,4 @@ export default (hydrate( 'div.commons-image', CommonsImage, minimalEntity, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/common/components/CritiqueBrainzReview.js b/root/static/scripts/common/components/CritiqueBrainzReview.js index 0c80fe61259..d9908f5c27a 100644 --- a/root/static/scripts/common/components/CritiqueBrainzReview.js +++ b/root/static/scripts/common/components/CritiqueBrainzReview.js @@ -57,4 +57,4 @@ component CritiqueBrainzReview(review: CritiqueBrainzReviewT, title: string) { export default (hydrate>( 'div.critiquebrainz-review', CritiqueBrainzReview, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/Filter.js b/root/static/scripts/common/components/Filter.js index e89414b091d..1ffe90287d4 100644 --- a/root/static/scripts/common/components/Filter.js +++ b/root/static/scripts/common/components/Filter.js @@ -69,5 +69,5 @@ component Filter(ajaxFormUrl: string, initialFilterForm: ?FilterFormT) { export default ( hydrate>('div.filter', Filter): - React.AbstractComponent> + React.ComponentType> ); diff --git a/root/static/scripts/common/components/FingerprintTable.js b/root/static/scripts/common/components/FingerprintTable.js index 84e5ef08b99..10ce8444f89 100644 --- a/root/static/scripts/common/components/FingerprintTable.js +++ b/root/static/scripts/common/components/FingerprintTable.js @@ -119,4 +119,4 @@ component FingerprintTable(recording: RecordingT) { export default (hydrate>( 'div.acoustid-fingerprints', FingerprintTable, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/IsrcList.js b/root/static/scripts/common/components/IsrcList.js index c9f8fa62b36..3773df8dbe2 100644 --- a/root/static/scripts/common/components/IsrcList.js +++ b/root/static/scripts/common/components/IsrcList.js @@ -52,4 +52,4 @@ component IsrcList( export default (hydrate>( 'div.isrc-list-container', IsrcList, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/IswcList.js b/root/static/scripts/common/components/IswcList.js index ca5980dd646..93bed948499 100644 --- a/root/static/scripts/common/components/IswcList.js +++ b/root/static/scripts/common/components/IswcList.js @@ -52,4 +52,4 @@ component IswcList( export default (hydrate>( 'div.iswc-list-container', IswcList, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/PostParameters.js b/root/static/scripts/common/components/PostParameters.js index 5721d820d09..679563627d7 100644 --- a/root/static/scripts/common/components/PostParameters.js +++ b/root/static/scripts/common/components/PostParameters.js @@ -90,4 +90,4 @@ component PostParameters(params: PostParametersT) { export default (hydrate( 'div.post-parameters', PostParameters, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/Relationships.js b/root/static/scripts/common/components/Relationships.js index 297cba3db31..9ddc43cb36f 100644 --- a/root/static/scripts/common/components/Relationships.js +++ b/root/static/scripts/common/components/Relationships.js @@ -127,7 +127,7 @@ component _Relationship( ); } -const Relationships: React.AbstractComponent> = +const Relationships: React.ComponentType> = React.memo(_Relationship); export default Relationships; diff --git a/root/static/scripts/common/components/ReleaseEvents.js b/root/static/scripts/common/components/ReleaseEvents.js index 0f0c5a5542d..7ecdbb3caa2 100644 --- a/root/static/scripts/common/components/ReleaseEvents.js +++ b/root/static/scripts/common/components/ReleaseEvents.js @@ -98,4 +98,4 @@ component ReleaseEvents( export default (hydrate>( 'div.release-events-container', ReleaseEvents, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/common/components/StaticRelationshipsDisplay.js b/root/static/scripts/common/components/StaticRelationshipsDisplay.js index 18d054be3d3..21adb0da8f2 100644 --- a/root/static/scripts/common/components/StaticRelationshipsDisplay.js +++ b/root/static/scripts/common/components/StaticRelationshipsDisplay.js @@ -141,7 +141,7 @@ component _StaticRelationshipsDisplay( return tables; } -const StaticRelationshipsDisplay: React.AbstractComponent< +const StaticRelationshipsDisplay: React.ComponentType< React.PropsOf<_StaticRelationshipsDisplay> > = React.memo(_StaticRelationshipsDisplay); diff --git a/root/static/scripts/common/components/TagEditor.js b/root/static/scripts/common/components/TagEditor.js index f56ec0e5066..77004094d89 100644 --- a/root/static/scripts/common/components/TagEditor.js +++ b/root/static/scripts/common/components/TagEditor.js @@ -645,7 +645,7 @@ export const MainTagEditor = (hydrate( } }, minimalEntity, -): React.AbstractComponent); +): React.ComponentType); export const SidebarTagEditor = (hydrate( 'div.sidebar-tags', @@ -703,7 +703,7 @@ export const SidebarTagEditor = (hydrate( } }, minimalEntity, -): React.AbstractComponent); +): React.ComponentType); function createInitialTagState( aggregatedTags: $ReadOnlyArray, diff --git a/root/static/scripts/common/components/TaggerIcon.js b/root/static/scripts/common/components/TaggerIcon.js index 9b88e27781e..9ddd156b748 100644 --- a/root/static/scripts/common/components/TaggerIcon.js +++ b/root/static/scripts/common/components/TaggerIcon.js @@ -82,5 +82,5 @@ export default ( hydrate>( 'span.tagger-icon', TaggerIcon, - ): React.AbstractComponent, void> + ): React.ComponentType> ); diff --git a/root/static/scripts/common/components/WikipediaExtract.js b/root/static/scripts/common/components/WikipediaExtract.js index be741712377..38a4a28c1d6 100644 --- a/root/static/scripts/common/components/WikipediaExtract.js +++ b/root/static/scripts/common/components/WikipediaExtract.js @@ -86,4 +86,4 @@ export default (hydrate( 'div.wikipedia-extract', WikipediaExtract, minimalEntity, -): React.AbstractComponent); +): React.ComponentType); diff --git a/root/static/scripts/common/components/WorkArtists.js b/root/static/scripts/common/components/WorkArtists.js index d7c7a70b30b..ef0151483d6 100644 --- a/root/static/scripts/common/components/WorkArtists.js +++ b/root/static/scripts/common/components/WorkArtists.js @@ -36,4 +36,4 @@ component WorkArtists(artists: ?$ReadOnlyArray) { export default (hydrate>( 'div.work-artists-container', WorkArtists, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/edit/components/ArtistCreditBubble.js b/root/static/scripts/edit/components/ArtistCreditBubble.js index 543c760a305..516fe8aa11a 100644 --- a/root/static/scripts/edit/components/ArtistCreditBubble.js +++ b/root/static/scripts/edit/components/ArtistCreditBubble.js @@ -311,7 +311,7 @@ component _ArtistCreditBubble( ); } -const ArtistCreditBubble: React.AbstractComponent< +const ArtistCreditBubble: React.ComponentType< React.PropsOf<_ArtistCreditBubble> > = React.memo(_ArtistCreditBubble); diff --git a/root/static/scripts/edit/components/ArtistCreditEditor.js b/root/static/scripts/edit/components/ArtistCreditEditor.js index bfb11d74a34..60f28b53bc9 100644 --- a/root/static/scripts/edit/components/ArtistCreditEditor.js +++ b/root/static/scripts/edit/components/ArtistCreditEditor.js @@ -596,7 +596,7 @@ component _ArtistCreditEditor( ); } -const ArtistCreditEditor: React.AbstractComponent< +const ArtistCreditEditor: React.ComponentType< React.PropsOf<_ArtistCreditEditor> > = React.memo(_ArtistCreditEditor); diff --git a/root/static/scripts/edit/components/ArtistCreditNameEditor.js b/root/static/scripts/edit/components/ArtistCreditNameEditor.js index 44870ab4add..8e1cc9cc5d5 100644 --- a/root/static/scripts/edit/components/ArtistCreditNameEditor.js +++ b/root/static/scripts/edit/components/ArtistCreditNameEditor.js @@ -228,7 +228,7 @@ component _ArtistCreditNameEditor( ); } -const ArtistCreditNameEditor: React.AbstractComponent< +const ArtistCreditNameEditor: React.ComponentType< React.PropsOf<_ArtistCreditNameEditor> > = React.memo(_ArtistCreditNameEditor); diff --git a/root/static/scripts/edit/components/DateRangeFieldset.js b/root/static/scripts/edit/components/DateRangeFieldset.js index f75ec765c2b..89281297884 100644 --- a/root/static/scripts/edit/components/DateRangeFieldset.js +++ b/root/static/scripts/edit/components/DateRangeFieldset.js @@ -222,7 +222,7 @@ component _DateRangeFieldset( ); } -const DateRangeFieldset: React.AbstractComponent< +const DateRangeFieldset: React.ComponentType< React.PropsOf<_DateRangeFieldset> > = React.memo(_DateRangeFieldset); diff --git a/root/static/scripts/edit/components/FormRowTextList.js b/root/static/scripts/edit/components/FormRowTextList.js index 2b4c2606ca8..b810850325b 100644 --- a/root/static/scripts/edit/components/FormRowTextList.js +++ b/root/static/scripts/edit/components/FormRowTextList.js @@ -174,4 +174,4 @@ export component NonHydratedFormRowTextList( export default (hydrate>( 'div.row.form-row-text-list-container', FormRowTextList, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/edit/components/GuessCaseOptionsPopover.js b/root/static/scripts/edit/components/GuessCaseOptionsPopover.js index 06c919cd73c..d5fee631548 100644 --- a/root/static/scripts/edit/components/GuessCaseOptionsPopover.js +++ b/root/static/scripts/edit/components/GuessCaseOptionsPopover.js @@ -62,7 +62,7 @@ component _GuessCaseOptionsPopover( ); } -const GuessCaseOptionsPopover: React.AbstractComponent< +const GuessCaseOptionsPopover: React.ComponentType< React.PropsOf<_GuessCaseOptionsPopover> > = React.memo(_GuessCaseOptionsPopover); diff --git a/root/static/scripts/edit/components/Multiselect.js b/root/static/scripts/edit/components/Multiselect.js index 1b764edb52a..d0bc32cd592 100644 --- a/root/static/scripts/edit/components/Multiselect.js +++ b/root/static/scripts/edit/components/Multiselect.js @@ -156,14 +156,15 @@ export function runReducer< } } -type MultiselectValueComponentT = React.AbstractComponent< +type MultiselectValueComponentT = React.ComponentType< MultiselectValuePropsT< AutocompleteEntityItemT, MultiselectValueStateT, >, - mixed, >; +// $FlowIgnore[incompatible-type] +// $FlowIgnore[incompatible-type-arg] export const MultiselectValue: MultiselectValueComponentT = React.memo(< V: AutocompleteEntityItemT, VS: MultiselectValueStateT, @@ -214,6 +215,7 @@ export const MultiselectValue: MultiselectValueComponentT = React.memo(< ); }); +// $FlowIgnore[incompatible-cast] const Multiselect = (React.memo(< V: AutocompleteEntityItemT, VS: MultiselectValueStateT, @@ -236,9 +238,8 @@ const Multiselect = (React.memo(< const GenericMultiselectValue = ( // $FlowIgnore[incompatible-cast] MultiselectValue: - React.AbstractComponent< + React.ComponentType< MultiselectValuePropsT, - mixed, > ); @@ -263,7 +264,7 @@ const Multiselect = (React.memo(< ) : null} ); -}): React.AbstractComponent< +}): React.ComponentType< MultiselectPropsT< AutocompleteEntityItemT, MultiselectValueStateT, @@ -272,7 +273,6 @@ const Multiselect = (React.memo(< MultiselectValueStateT, >, >, - mixed, >); export default Multiselect; diff --git a/root/static/scripts/edit/components/NewNotesAlertCheckbox.js b/root/static/scripts/edit/components/NewNotesAlertCheckbox.js index 2c0bda67daf..74c9ff047dc 100644 --- a/root/static/scripts/edit/components/NewNotesAlertCheckbox.js +++ b/root/static/scripts/edit/components/NewNotesAlertCheckbox.js @@ -36,5 +36,5 @@ export default ( hydrate>( 'span.new-notes-alert-checkbox', NewNotesAlertCheckbox, - ): React.AbstractComponent, void> + ): React.ComponentType> ); diff --git a/root/static/scripts/edit/components/ReleaseMergeStrategy.js b/root/static/scripts/edit/components/ReleaseMergeStrategy.js index 3913d62449c..bb35b963a0e 100644 --- a/root/static/scripts/edit/components/ReleaseMergeStrategy.js +++ b/root/static/scripts/edit/components/ReleaseMergeStrategy.js @@ -301,4 +301,4 @@ component ReleaseMergeStrategy( export default (hydrate>( 'div.release-merge-strategy', ReleaseMergeStrategy, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/edit/components/edit/RelationshipDiff.js b/root/static/scripts/edit/components/edit/RelationshipDiff.js index 0de5bb8c9f1..84100d16cce 100644 --- a/root/static/scripts/edit/components/edit/RelationshipDiff.js +++ b/root/static/scripts/edit/components/edit/RelationshipDiff.js @@ -240,7 +240,7 @@ component _RelationshipDiff( ); } -const RelationshipDiff: React.AbstractComponent< +const RelationshipDiff: React.ComponentType< React.PropsOf<_RelationshipDiff> > = React.memo(_RelationshipDiff); diff --git a/root/static/scripts/event/components/EventEditForm.js b/root/static/scripts/event/components/EventEditForm.js index 29f557ba99e..6b73e9a7218 100644 --- a/root/static/scripts/event/components/EventEditForm.js +++ b/root/static/scripts/event/components/EventEditForm.js @@ -367,4 +367,4 @@ component EventEditForm( export default (hydrate>( 'div.event-edit-form', EventEditForm, -): React.AbstractComponent>); +): React.ComponentType>); diff --git a/root/static/scripts/genre/components/GenreEditForm.js b/root/static/scripts/genre/components/GenreEditForm.js index 6c56d4b8b46..96ac4e98294 100644 --- a/root/static/scripts/genre/components/GenreEditForm.js +++ b/root/static/scripts/genre/components/GenreEditForm.js @@ -165,4 +165,4 @@ component GenreEditForm(form as initialForm: GenreFormT) { export default (hydrate>( 'div.genre-edit-form', GenreEditForm, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/main/components/ConfirmSeedButtons.js b/root/static/scripts/main/components/ConfirmSeedButtons.js index ad6d618ddb1..6a62dc8de4b 100644 --- a/root/static/scripts/main/components/ConfirmSeedButtons.js +++ b/root/static/scripts/main/components/ConfirmSeedButtons.js @@ -47,4 +47,4 @@ component ConfirmSeedButtons(autoSubmit: boolean) { export default (hydrate( 'span.buttons.confirm-seed', ConfirmSeedButtons, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/recording/RecordingName.js b/root/static/scripts/recording/RecordingName.js index 46acac923d3..44939516731 100644 --- a/root/static/scripts/recording/RecordingName.js +++ b/root/static/scripts/recording/RecordingName.js @@ -59,4 +59,4 @@ export component RecordingName( export default (hydrate>( 'div.recording-name', RecordingName, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js b/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js index 43a4b64f3e6..afe251c0d6d 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js +++ b/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js @@ -64,7 +64,7 @@ component _BooleanAttribute( ); } -const BooleanAttribute: React.AbstractComponent< +const BooleanAttribute: React.ComponentType< React.PropsOf<_BooleanAttribute> > = React.memo(_BooleanAttribute); diff --git a/root/static/scripts/relationship-editor/components/DialogAttribute/MultiselectAttribute.js b/root/static/scripts/relationship-editor/components/DialogAttribute/MultiselectAttribute.js index 16f629c17ee..dea265a898a 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttribute/MultiselectAttribute.js +++ b/root/static/scripts/relationship-editor/components/DialogAttribute/MultiselectAttribute.js @@ -224,13 +224,12 @@ component MultiselectAttributeComponent( // eslint-disable-next-line ft-flow/enforce-suppression-code // $FlowIgnore Multiselect: - React.AbstractComponent< + React.ComponentType< MultiselectPropsT< LinkAttrTypeT, DialogMultiselectAttributeValueStateT, DialogMultiselectAttributeStateT, >, - mixed, > ); @@ -245,7 +244,7 @@ component MultiselectAttributeComponent( } type MultiselectAttributeMemoT = - React.AbstractComponent>; + React.ComponentType>; const MultiselectAttribute: MultiselectAttributeMemoT = React.memo(MultiselectAttributeComponent); diff --git a/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js b/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js index 20900439faf..cf9a47ff312 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js +++ b/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js @@ -59,7 +59,7 @@ component _TextAttribute( ); } -const TextAttribute: React.AbstractComponent< +const TextAttribute: React.ComponentType< React.PropsOf<_TextAttribute> > = React.memo(_TextAttribute); diff --git a/root/static/scripts/relationship-editor/components/DialogAttributes.js b/root/static/scripts/relationship-editor/components/DialogAttributes.js index 18120033954..9c14c1a56dd 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttributes.js +++ b/root/static/scripts/relationship-editor/components/DialogAttributes.js @@ -476,7 +476,7 @@ component _DialogAttributes( ); } -const DialogAttributes: React.AbstractComponent< +const DialogAttributes: React.ComponentType< React.PropsOf<_DialogAttributes> > = React.memo(_DialogAttributes); diff --git a/root/static/scripts/relationship-editor/components/DialogButtons.js b/root/static/scripts/relationship-editor/components/DialogButtons.js index 94acf72c2eb..06a818cfd55 100644 --- a/root/static/scripts/relationship-editor/components/DialogButtons.js +++ b/root/static/scripts/relationship-editor/components/DialogButtons.js @@ -36,7 +36,7 @@ component _DialogButtons( ); } -const DialogButtons: React.AbstractComponent< +const DialogButtons: React.ComponentType< React.PropsOf<_DialogButtons> > = React.memo(_DialogButtons); diff --git a/root/static/scripts/relationship-editor/components/DialogDatePeriod.js b/root/static/scripts/relationship-editor/components/DialogDatePeriod.js index fc3f62719a3..02e7e274c1f 100644 --- a/root/static/scripts/relationship-editor/components/DialogDatePeriod.js +++ b/root/static/scripts/relationship-editor/components/DialogDatePeriod.js @@ -228,7 +228,7 @@ component _DialogDatePeriod( ); } -const DialogDatePeriod: React.AbstractComponent< +const DialogDatePeriod: React.ComponentType< React.PropsOf<_DialogDatePeriod> > = React.memo(_DialogDatePeriod); diff --git a/root/static/scripts/relationship-editor/components/DialogEntityCredit.js b/root/static/scripts/relationship-editor/components/DialogEntityCredit.js index fd99f8403bf..4363cfcf21c 100644 --- a/root/static/scripts/relationship-editor/components/DialogEntityCredit.js +++ b/root/static/scripts/relationship-editor/components/DialogEntityCredit.js @@ -215,7 +215,7 @@ component _DialogEntityCredit( ); } -const DialogEntityCredit: React.AbstractComponent< +const DialogEntityCredit: React.ComponentType< React.PropsOf<_DialogEntityCredit> > = React.memo(_DialogEntityCredit); diff --git a/root/static/scripts/relationship-editor/components/DialogLinkOrder.js b/root/static/scripts/relationship-editor/components/DialogLinkOrder.js index 1f048ead5b5..73d1dc9f2e2 100644 --- a/root/static/scripts/relationship-editor/components/DialogLinkOrder.js +++ b/root/static/scripts/relationship-editor/components/DialogLinkOrder.js @@ -58,7 +58,7 @@ component _DialogLinkOrder( ); } -const DialogLinkOrder: React.AbstractComponent< +const DialogLinkOrder: React.ComponentType< React.PropsOf<_DialogLinkOrder> > = React.memo(_DialogLinkOrder); diff --git a/root/static/scripts/relationship-editor/components/DialogLinkType.js b/root/static/scripts/relationship-editor/components/DialogLinkType.js index 6b6ce473d69..8f5192bf817 100644 --- a/root/static/scripts/relationship-editor/components/DialogLinkType.js +++ b/root/static/scripts/relationship-editor/components/DialogLinkType.js @@ -261,7 +261,7 @@ function accumulateDialogAttributeByRootId( } const LinkTypeAutocomplete: - React.AbstractComponent> = + React.ComponentType> = Autocomplete2; component _DialogLinkType( @@ -335,7 +335,7 @@ component _DialogLinkType( ); } -const DialogLinkType: React.AbstractComponent< +const DialogLinkType: React.ComponentType< React.PropsOf<_DialogLinkType> > = React.memo(_DialogLinkType); diff --git a/root/static/scripts/relationship-editor/components/DialogPreview.js b/root/static/scripts/relationship-editor/components/DialogPreview.js index 4484b884ab2..26a37bc8f6f 100644 --- a/root/static/scripts/relationship-editor/components/DialogPreview.js +++ b/root/static/scripts/relationship-editor/components/DialogPreview.js @@ -232,7 +232,7 @@ component _DialogPreview( ); } -const DialogPreview: React.AbstractComponent< +const DialogPreview: React.ComponentType< React.PropsOf<_DialogPreview> > = React.memo(_DialogPreview); diff --git a/root/static/scripts/relationship-editor/components/DialogSourceEntity.js b/root/static/scripts/relationship-editor/components/DialogSourceEntity.js index f5fdd967c9a..71a6f949045 100644 --- a/root/static/scripts/relationship-editor/components/DialogSourceEntity.js +++ b/root/static/scripts/relationship-editor/components/DialogSourceEntity.js @@ -132,7 +132,7 @@ component _DialogSourceEntity( ); } -const DialogSourceEntity: React.AbstractComponent< +const DialogSourceEntity: React.ComponentType< React.PropsOf<_DialogSourceEntity> > = React.memo(_DialogSourceEntity); diff --git a/root/static/scripts/relationship-editor/components/DialogTargetEntity.js b/root/static/scripts/relationship-editor/components/DialogTargetEntity.js index c304eb7a8a0..0b574244e10 100644 --- a/root/static/scripts/relationship-editor/components/DialogTargetEntity.js +++ b/root/static/scripts/relationship-editor/components/DialogTargetEntity.js @@ -299,7 +299,7 @@ export function reducer( // XXX Until Flow supports https://github.com/facebook/flow/issues/7672 const TargetAutocomplete: - React.AbstractComponent> = + React.ComponentType> = // $FlowIgnore[incompatible-type] Autocomplete2; @@ -387,7 +387,7 @@ component _DialogTargetEntity( ); } -const DialogTargetEntity: React.AbstractComponent< +const DialogTargetEntity: React.ComponentType< React.PropsOf<_DialogTargetEntity> > = React.memo(_DialogTargetEntity); diff --git a/root/static/scripts/relationship-editor/components/DialogTargetType.js b/root/static/scripts/relationship-editor/components/DialogTargetType.js index 5e357bfbdbe..66610764ef7 100644 --- a/root/static/scripts/relationship-editor/components/DialogTargetType.js +++ b/root/static/scripts/relationship-editor/components/DialogTargetType.js @@ -59,7 +59,7 @@ component _DialogTargetType( ); } -const DialogTargetType: React.AbstractComponent< +const DialogTargetType: React.ComponentType< React.PropsOf<_DialogTargetType> > = React.memo(_DialogTargetType); diff --git a/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js b/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js index ca4a65b34af..7417483e96b 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js +++ b/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js @@ -1013,7 +1013,7 @@ component _RelationshipDialogContent(...props: PropsT) { ); } -const RelationshipDialogContent: React.AbstractComponent< +const RelationshipDialogContent: React.ComponentType< React.PropsOf<_RelationshipDialogContent> > = React.memo(_RelationshipDialogContent); diff --git a/root/static/scripts/relationship-editor/components/RelationshipEditor.js b/root/static/scripts/relationship-editor/components/RelationshipEditor.js index 443b5508cea..2f24cb606d9 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipEditor.js +++ b/root/static/scripts/relationship-editor/components/RelationshipEditor.js @@ -556,7 +556,7 @@ type ErrorMessagePropsT = { }; export const ErrorMessage: - React.AbstractComponent = + React.ComponentType = React.memo(({ error, }: ErrorMessagePropsT): React.MixedElement => ( diff --git a/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js b/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js index 89c5a1af79e..823d34d7a55 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js +++ b/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js @@ -57,7 +57,7 @@ component _RelationshipEditorWrapper(...props: PropsT) { } export const NonHydratedRelationshipEditorWrapper: - React.AbstractComponent = + React.ComponentType = withLoadedTypeInfoForRelationshipEditor( _RelationshipEditorWrapper, ); @@ -65,6 +65,6 @@ export const NonHydratedRelationshipEditorWrapper: const RelationshipEditorWrapper = (hydrate( 'div.relationship-editor', NonHydratedRelationshipEditorWrapper, -): React.AbstractComponent); +): React.ComponentType); export default RelationshipEditorWrapper; diff --git a/root/static/scripts/relationship-editor/components/RelationshipItem.js b/root/static/scripts/relationship-editor/components/RelationshipItem.js index 7ce6ffdc8a7..6d19083e285 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipItem.js +++ b/root/static/scripts/relationship-editor/components/RelationshipItem.js @@ -281,7 +281,7 @@ component _RelationshipItem( ); } -const RelationshipItem: React.AbstractComponent< +const RelationshipItem: React.ComponentType< React.PropsOf<_RelationshipItem> > = React.memo(_RelationshipItem); diff --git a/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js b/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js index ba4f1c73ad2..9be4990c911 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js @@ -52,7 +52,7 @@ component _RelationshipLinkTypeGroup( return elements; } -const RelationshipLinkTypeGroup: React.AbstractComponent< +const RelationshipLinkTypeGroup: React.ComponentType< React.PropsOf<_RelationshipLinkTypeGroup> > = React.memo(_RelationshipLinkTypeGroup); diff --git a/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js b/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js index b7727b0fdf4..9cede8b4d60 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js @@ -302,7 +302,7 @@ component _RelationshipPhraseGroup( ) : null; } -const RelationshipPhraseGroup: React.AbstractComponent< +const RelationshipPhraseGroup: React.ComponentType< React.PropsOf<_RelationshipPhraseGroup> > = React.memo(_RelationshipPhraseGroup); diff --git a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js index c10b9cc3473..98af23b5973 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js @@ -55,7 +55,7 @@ component _RelationshipTargetTypeGroup( return elements; } -const RelationshipTargetTypeGroup: React.AbstractComponent< +const RelationshipTargetTypeGroup: React.ComponentType< React.PropsOf<_RelationshipTargetTypeGroup> > = React.memo(_RelationshipTargetTypeGroup); diff --git a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js index 55748ab9df3..625f4d56f78 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js +++ b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js @@ -113,7 +113,7 @@ component _RelationshipTargetTypeGroups( ); } -const RelationshipTargetTypeGroups: React.AbstractComponent< +const RelationshipTargetTypeGroups: React.ComponentType< React.PropsOf<_RelationshipTargetTypeGroups> > = React.memo(_RelationshipTargetTypeGroups); diff --git a/root/static/scripts/release/components/BatchCreateWorksDialog.js b/root/static/scripts/release/components/BatchCreateWorksDialog.js index 9841cc9454f..852f4c5fddd 100644 --- a/root/static/scripts/release/components/BatchCreateWorksDialog.js +++ b/root/static/scripts/release/components/BatchCreateWorksDialog.js @@ -334,6 +334,6 @@ component _BatchCreateWorksButtonPopover( ); } -export const BatchCreateWorksButtonPopover: React.AbstractComponent< +export const BatchCreateWorksButtonPopover: React.ComponentType< React.PropsOf<_BatchCreateWorksButtonPopover> > = React.memo(_BatchCreateWorksButtonPopover); diff --git a/root/static/scripts/release/components/EditWorkDialog.js b/root/static/scripts/release/components/EditWorkDialog.js index 55153601212..5f8dab11ad0 100644 --- a/root/static/scripts/release/components/EditWorkDialog.js +++ b/root/static/scripts/release/components/EditWorkDialog.js @@ -187,7 +187,7 @@ component _EditWorkDialog( ); } -const EditWorkDialog: React.AbstractComponent< +const EditWorkDialog: React.ComponentType< React.PropsOf<_EditWorkDialog> > = React.memo(_EditWorkDialog); diff --git a/root/static/scripts/release/components/MediumRelationshipEditor.js b/root/static/scripts/release/components/MediumRelationshipEditor.js index dd09023980f..3b18a6193c3 100644 --- a/root/static/scripts/release/components/MediumRelationshipEditor.js +++ b/root/static/scripts/release/components/MediumRelationshipEditor.js @@ -188,7 +188,7 @@ component _MediumRelationshipEditor( ); } -const MediumRelationshipEditor: React.AbstractComponent< +const MediumRelationshipEditor: React.ComponentType< React.PropsOf<_MediumRelationshipEditor> > = React.memo(_MediumRelationshipEditor); diff --git a/root/static/scripts/release/components/MediumTable.js b/root/static/scripts/release/components/MediumTable.js index d8880be0947..4dfba87f3f8 100644 --- a/root/static/scripts/release/components/MediumTable.js +++ b/root/static/scripts/release/components/MediumTable.js @@ -137,7 +137,7 @@ component _MediumTable( ); } -const MediumTable: React.AbstractComponent< +const MediumTable: React.ComponentType< React.PropsOf<_MediumTable> > = React.memo(_MediumTable); diff --git a/root/static/scripts/release/components/MediumToolbox.js b/root/static/scripts/release/components/MediumToolbox.js index e3db12fe66d..397ae1564af 100644 --- a/root/static/scripts/release/components/MediumToolbox.js +++ b/root/static/scripts/release/components/MediumToolbox.js @@ -54,7 +54,7 @@ component _ToggleAllMediumsButtons( ); } -export const ToggleAllMediumsButtons: React.AbstractComponent< +export const ToggleAllMediumsButtons: React.ComponentType< React.PropsOf<_ToggleAllMediumsButtons> > = React.memo(_ToggleAllMediumsButtons); @@ -90,7 +90,7 @@ component _MediumToolbox( ); } -const MediumToolbox: React.AbstractComponent< +const MediumToolbox: React.ComponentType< React.PropsOf<_MediumToolbox> > = React.memo(_MediumToolbox); diff --git a/root/static/scripts/release/components/MediumTrackRow.js b/root/static/scripts/release/components/MediumTrackRow.js index e37f2e00160..9e1ac2fee35 100644 --- a/root/static/scripts/release/components/MediumTrackRow.js +++ b/root/static/scripts/release/components/MediumTrackRow.js @@ -84,7 +84,7 @@ component _MediumTrackRow( ); } -const MediumTrackRow: React.AbstractComponent< +const MediumTrackRow: React.ComponentType< React.PropsOf<_MediumTrackRow> > = React.memo(_MediumTrackRow); diff --git a/root/static/scripts/release/components/RelationshipEditorBatchTools.js b/root/static/scripts/release/components/RelationshipEditorBatchTools.js index 50100489462..c5ba0be1ef7 100644 --- a/root/static/scripts/release/components/RelationshipEditorBatchTools.js +++ b/root/static/scripts/release/components/RelationshipEditorBatchTools.js @@ -165,7 +165,7 @@ component _RelationshipEditorBatchTools( ); } -const RelationshipEditorBatchTools: React.AbstractComponent< +const RelationshipEditorBatchTools: React.ComponentType< React.PropsOf<_RelationshipEditorBatchTools> > = React.memo(_RelationshipEditorBatchTools); diff --git a/root/static/scripts/release/components/ReleaseRelationshipEditor.js b/root/static/scripts/release/components/ReleaseRelationshipEditor.js index 924137ac0c7..13a2a52e3f9 100644 --- a/root/static/scripts/release/components/ReleaseRelationshipEditor.js +++ b/root/static/scripts/release/components/ReleaseRelationshipEditor.js @@ -1857,7 +1857,7 @@ component _ReleaseRelationshipEditor() { ); } -const NonHydratedReleaseRelationshipEditor: React.AbstractComponent<{}> = +const NonHydratedReleaseRelationshipEditor: React.ComponentType<{}> = withLoadedTypeInfoForRelationshipEditor<{}>( _ReleaseRelationshipEditor, ['language', 'work_type'], @@ -1866,6 +1866,6 @@ const NonHydratedReleaseRelationshipEditor: React.AbstractComponent<{}> = const ReleaseRelationshipEditor = (hydrate<{}>( 'div.release-relationship-editor', NonHydratedReleaseRelationshipEditor, -): React.AbstractComponent<{}, void>); +): React.ComponentType<{}>); export default ReleaseRelationshipEditor; diff --git a/root/static/scripts/release/components/TrackRelationshipEditor.js b/root/static/scripts/release/components/TrackRelationshipEditor.js index e5daa7b116e..17343034b8b 100644 --- a/root/static/scripts/release/components/TrackRelationshipEditor.js +++ b/root/static/scripts/release/components/TrackRelationshipEditor.js @@ -495,7 +495,7 @@ component _TrackRelationshipEditor( ); } -const TrackRelationshipEditor: React.AbstractComponent< +const TrackRelationshipEditor: React.ComponentType< React.PropsOf<_TrackRelationshipEditor> > = React.memo(_TrackRelationshipEditor); diff --git a/root/static/scripts/release/components/TracklistAndCredits.js b/root/static/scripts/release/components/TracklistAndCredits.js index e83e7976a65..05e3888c406 100644 --- a/root/static/scripts/release/components/TracklistAndCredits.js +++ b/root/static/scripts/release/components/TracklistAndCredits.js @@ -411,11 +411,11 @@ component _TracklistAndCredits( ); } -const TracklistAndCredits: React.AbstractComponent< +const TracklistAndCredits: React.ComponentType< React.PropsOf<_TracklistAndCredits> > = React.memo(_TracklistAndCredits); export default (hydrate>( 'div.tracklist-and-credits', TracklistAndCredits, -): React.AbstractComponent, void>); +): React.ComponentType>); diff --git a/root/static/scripts/release/components/WorkLanguageMultiselect.js b/root/static/scripts/release/components/WorkLanguageMultiselect.js index 074e416c052..355881188b4 100644 --- a/root/static/scripts/release/components/WorkLanguageMultiselect.js +++ b/root/static/scripts/release/components/WorkLanguageMultiselect.js @@ -120,19 +120,17 @@ const LanguageMultiselect = ( // eslint-disable-next-line ft-flow/enforce-suppression-code // $FlowIgnore Multiselect: - React.AbstractComponent< + React.ComponentType< MultiselectPropsT< LanguageT, MultiselectLanguageValueStateT, MultiselectLanguageStateT, - >, - mixed, + > > ); -const WorkLanguageMultiselect: React.AbstractComponent< +const WorkLanguageMultiselect: React.ComponentType< WorkLanguageMultiselectPropsT, - mixed, > = React.memo< WorkLanguageMultiselectPropsT, >(({ diff --git a/root/static/scripts/release/components/WorkTypeSelect.js b/root/static/scripts/release/components/WorkTypeSelect.js index 4ce479a1cfe..10e36df5465 100644 --- a/root/static/scripts/release/components/WorkTypeSelect.js +++ b/root/static/scripts/release/components/WorkTypeSelect.js @@ -68,7 +68,7 @@ component _WorkTypeSelect( ); } -const WorkTypeSelect: React.AbstractComponent< +const WorkTypeSelect: React.ComponentType< React.PropsOf<_WorkTypeSelect> > = React.memo(_WorkTypeSelect); diff --git a/root/static/scripts/series/components/SeriesRelationshipEditor.js b/root/static/scripts/series/components/SeriesRelationshipEditor.js index a827c24a236..76813f4cc92 100644 --- a/root/static/scripts/series/components/SeriesRelationshipEditor.js +++ b/root/static/scripts/series/components/SeriesRelationshipEditor.js @@ -179,7 +179,7 @@ component _SeriesRelationshipEditor(...props: PropsT) { ); } -const NonHydratedSeriesRelationshipEditor: React.AbstractComponent = +const NonHydratedSeriesRelationshipEditor: React.ComponentType = withLoadedTypeInfoForRelationshipEditor( _SeriesRelationshipEditor, ); @@ -187,6 +187,6 @@ const NonHydratedSeriesRelationshipEditor: React.AbstractComponent = const SeriesRelationshipEditor = (hydrate( 'div.relationship-editor', NonHydratedSeriesRelationshipEditor, -): React.AbstractComponent); +): React.ComponentType); export default SeriesRelationshipEditor; diff --git a/root/static/scripts/tests/examples/todo-list/Todo.js b/root/static/scripts/tests/examples/todo-list/Todo.js index a9e20809a84..173127d5127 100644 --- a/root/static/scripts/tests/examples/todo-list/Todo.js +++ b/root/static/scripts/tests/examples/todo-list/Todo.js @@ -50,7 +50,7 @@ export function reducer( } } -type TodoComponentT = React.AbstractComponent; +type TodoComponentT = React.ComponentType; const Todo: TodoComponentT = React.memo(({ dispatch, diff --git a/root/static/scripts/url/components/UrlRelationshipEditor.js b/root/static/scripts/url/components/UrlRelationshipEditor.js index 7e9c60339c6..8096bb2a5f6 100644 --- a/root/static/scripts/url/components/UrlRelationshipEditor.js +++ b/root/static/scripts/url/components/UrlRelationshipEditor.js @@ -63,7 +63,7 @@ component _UrlRelationshipEditor(...props: PropsT) { ); } -const NonHydratedUrlRelationshipEditor: React.AbstractComponent = +const NonHydratedUrlRelationshipEditor: React.ComponentType = withLoadedTypeInfoForRelationshipEditor( _UrlRelationshipEditor, ); @@ -71,6 +71,6 @@ const NonHydratedUrlRelationshipEditor: React.AbstractComponent = const UrlRelationshipEditor = (hydrate( 'div.relationship-editor', NonHydratedUrlRelationshipEditor, -): React.AbstractComponent); +): React.ComponentType); export default UrlRelationshipEditor; diff --git a/root/utility/hydrate.js b/root/utility/hydrate.js index 25a2971305c..f2e9e9aa54b 100644 --- a/root/utility/hydrate.js +++ b/root/utility/hydrate.js @@ -98,7 +98,7 @@ export default function hydrate< SanitizedConfig = Config, >( containerSelector: string, - Component: React.AbstractComponent, + Component: React.ComponentType, mungeProps?: (Config) => SanitizedConfig, ): React.AbstractComponent { const [ContainerTag, ...classes] = containerSelector.split('.'); diff --git a/root/vars.js b/root/vars.js index 0f8d2df98fe..cfa3d4096ae 100644 --- a/root/vars.js +++ b/root/vars.js @@ -30,7 +30,7 @@ declare var hydrate: ( SanitizedConfig = Config, >( containerSelector: string, - Component: React.AbstractComponent, + Component: React.ComponentType, mungeProps?: (Config) => SanitizedConfig, ) => React.AbstractComponent ); diff --git a/yarn.lock b/yarn.lock index 54b8f297e1a..08901da9e0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4396,12 +4396,12 @@ __metadata: languageName: node linkType: hard -"flow-bin@npm:0.250.0": - version: 0.250.0 - resolution: "flow-bin@npm:0.250.0" +"flow-bin@npm:0.256.0": + version: 0.256.0 + resolution: "flow-bin@npm:0.256.0" bin: flow: cli.js - checksum: 10c0/9ca0e669945594ba60b0583ce1d88abdc9c731410b9906ed61bcc254beaa6df0905578284318696a2a562eb82d94db1756b567848693a4af6660ac386aac142a + checksum: 10c0/700fce13ab27a083552f16c8e41fe07d0bca7946c7b9daf2014bc457cf9dde82f8c063d3fafe9c191b7704a40b61444dfdbd42b28fe924d3e30c20b5c224c644 languageName: node linkType: hard @@ -6346,7 +6346,7 @@ __metadata: eslint-plugin-simple-import-sort: "npm:^7.0.0" fast-diff: "npm:1.3.0" filesize: "npm:10.1.4" - flow-bin: "npm:0.250.0" + flow-bin: "npm:0.256.0" generic-diff: "npm:1.0.1" gettext-parser: "npm:4.2.0" globals: "npm:15.9.0"