New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to flow v0.69.0 #509
Upgrade to flow v0.69.0 #509
Conversation
packages/gestalt/src/Contents.js
Outdated
@@ -371,7 +371,7 @@ export default class Contents extends React.Component<Props, State> { | |||
mainDir: null, | |||
}; | |||
|
|||
flyout = React.createRef(); | |||
flyout: {| current: null | HTMLDivElement |} = React.createRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such a weird type - it would feel way more natural to do something like flyout = React.createRef<HTMLDivElement>();
but obviously what do I know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @christianvuerings !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since gestalt is at 0.96 we need to make sure our codebase is at 0.96 when we merge this in otherwise it might complain about unused suppressions
packages/gestalt/src/Contents.js
Outdated
@@ -371,7 +371,7 @@ export default class Contents extends React.Component<Props, State> { | |||
mainDir: null, | |||
}; | |||
|
|||
flyout = React.createRef(); | |||
flyout: {| current: null | HTMLDivElement |} = React.createRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree we dont have a nice polymorphic type, but can we use React.ElementRef
maybe?
facebook/flow@d74ab13
https://flow.org/en/docs/react/types/#toc-react-elementref
packages/gestalt/src/Tooltip.js
Outdated
@@ -22,7 +22,7 @@ export default class Tooltip extends React.Component<Props, State> { | |||
hovered: false, | |||
}; | |||
|
|||
childRef = React.createRef(); | |||
childRef: {| current: null | HTMLDivElement |} = React.createRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, React.ElementRef
?
https://github.com/facebook/flow/releases/tag/v0.96.0