@samitouri / QOS-React-2 / commits / 6095993d46

Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265)

* Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> * Prettier

Eli White committed Nov 4, 2019 at 10:14 UTC 6095993d461a58da14dae9866486359497af339e
3 files changed +5 -3
packages/react-native-renderer/src/ReactFabric.js
+1 -1
@@ -45,7 +45,7 @@ const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
45
46 function findHostInstance_DEPRECATED(
47 componentOrHandle: any,
48 -): ?HostComponent<mixed> {
48 +): ?React$ElementRef<HostComponent<mixed>> {
49 if (__DEV__) {
50 const owner = ReactCurrentOwner.current;
51 if (owner !== null && owner.stateNode !== null) {
packages/react-native-renderer/src/ReactNativeRenderer.js
+1 -1
@@ -49,7 +49,7 @@ const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
49
50 function findHostInstance_DEPRECATED(
51 componentOrHandle: any,
52 -): ?HostComponent<mixed> {
52 +): ?React$ElementRef<HostComponent<mixed>> {
53 if (__DEV__) {
54 const owner = ReactCurrentOwner.current;
55 if (owner !== null && owner.stateNode !== null) {
packages/react-native-renderer/src/ReactNativeTypes.js
+3 -1
@@ -141,7 +141,9 @@ type SecretInternalsFabricType = {
141 */
142 export type ReactNativeType = {
143 NativeComponent: typeof ReactNativeComponent,
144 - findHostInstance_DEPRECATED(componentOrHandle: any): ?HostComponent<mixed>,
144 + findHostInstance_DEPRECATED(
145 + componentOrHandle: any,
146 + ): ?ElementRef<HostComponent<mixed>>,
147 findNodeHandle(componentOrHandle: any): ?number,
148 dispatchCommand(handle: any, command: string, args: Array<any>): void,
149 render(