Fix ref and component return types

Summary:
These types aren't robust to changes in the React component type. When we refactor requireNativeComponent these will error. This change is forwards compatible.

Changelog:
[Internal] Improve internal type in DrawerLayoutAndroid

Reviewed By: JoshuaGross

Differential Revision: D17561194

fbshipit-source-id: 470289449b4d5b3148692f1945fb720e1e3972eb
This commit is contained in:
Eli White
2019-09-24 18:51:46 -07:00
committed by Facebook Github Bot
parent 419722bd07
commit e028ac7af2
@@ -170,7 +170,9 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
drawerBackgroundColor: 'white',
};
_nativeRef = React.createRef<AndroidDrawerLayoutNativeComponent>();
_nativeRef = React.createRef<
React.ElementRef<typeof AndroidDrawerLayoutNativeComponent>,
>();
state: State = {statusBarBackgroundColor: null};