Skip to content

Commit

Permalink
fix some flow reference-before-declaration errors
Browse files Browse the repository at this point in the history
Summary:
The `typeof X` type annotation now respects the initialization state of `X`: if `X` hasn't been declared it will be an error to get its type.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D40638870

fbshipit-source-id: 57459dec30ec5b87397365a709f2d846c87e378a
  • Loading branch information
mroch authored and facebook-github-bot committed Oct 25, 2022
1 parent 745f3ee commit 68983b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class EnableDisableList extends React.Component<{}, {scrollEnabled: boolean}> {
let AppendingListItemCount = 6;
class AppendingList extends React.Component<
{},
{items: Array<React.Element<typeof Item>>},
{items: Array<React$Element<Class<Item>>>},
> {
state: {items: Array<React.Element<typeof Item>>} = {
state: {items: Array<React.Element<Class<Item>>>} = {
items: [...Array(AppendingListItemCount)].map((_, ii) => (
<Item msg={`Item ${ii}`} />
)),
Expand Down

0 comments on commit 68983b6

Please sign in to comment.